Skip to content

Commit 1177a13

Browse files
committed
Add: images for k-deubg doc
Signed-off-by: Ali Mehraji <a.mehraji75@gmail.com>
1 parent e9342a8 commit 1177a13

12 files changed

Lines changed: 30 additions & 12 deletions

posts/alertmanager-telegram-k8s-prometheus.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Alertmanager with Telegram for Prometheus-Stack in K8S
33
published: true
44
description: Add Telegram Receiver for alertmanager for prometheus-stack in k8s cluster
55
tags: 'alertmanager,prometheus,monitoring,kubernetes'
6-
cover_image: 'https://raw.githubusercontent.com/AliMehraji/Documents/refs/heads/main/posts/assets/alertmanager-to-telegram.webp'
6+
cover_image: 'https://raw.githubusercontent.com/cod3mas0n/Documents/refs/heads/main/posts/assets/alertmanager-to-telegram.webp'
77
canonical_url: null
88
id: 2320569
99
date: '2025-03-09T12:06:12Z'
55.3 KB
Loading
37.7 KB
Loading
39.7 KB
Loading
48.6 KB
Loading
66.6 KB
Loading

posts/kubectl-debug-ephemeral-ctrs.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Kubernetes Ephemeral Containers and kubectl debug Command
33
published: true
44
description: Deep Diving Kubernetes Ephemeral Containers and kubectl debug Command
55
tags: kubernetes
6-
cover_image: 'https://raw.githubusercontent.com/AliMehraji/Documents/refs/heads/main/posts/assets/k8s-debug-ctr-in-pod-shared-ns.webP'
6+
cover_image: 'https://raw.githubusercontent.com/cod3mas0n/Documents/refs/heads/main/posts/assets/k8s-debug-ctr-in-pod-shared-ns.webP'
77
canonical_url: null
88
id: 2795240
99
date: '2025-08-23T22:29:01Z'
@@ -82,6 +82,10 @@ error: Internal error occurred: Internal error occurred: error executing command
8282

8383
### `kubectl debug`
8484

85+
![](https://raw.githubusercontent.com/cod3mas0n/Documents/refs/heads/main/posts/assets/kubectl-debug/cdebug-slide-4.webp "Kubectl debug")
86+
87+
![](https://raw.githubusercontent.com/cod3mas0n/Documents/refs/heads/main/posts/assets/kubectl-debug/cdebug-slide-5.webp "debuger endpoint")
88+
8589
```bash
8690
POD_NAME=$(kubectl get pods -l app=distroless-nginx -o jsonpath='{.items[0].metadata.name}')
8791
kubectl debug -it -c debugger --image=busybox ${POD_NAME}
@@ -188,6 +192,20 @@ Don't forget to clean up the debugging Pod when you're finished with it:
188192
kubectl delete pod node-debugger-debian-11-wrjhs
189193
```
190194

195+
### Sidecar container via Docker
196+
197+
![](https://raw.githubusercontent.com/cod3mas0n/Documents/refs/heads/main/posts/assets/kubectl-debug/cdebug-slide-3.webp "docker exec ,sidecar")
198+
199+
How `docker exec` and [`cdebug`](https://github.com/iximiuz/cdebug) works ?
200+
201+
How to reproduce the docker exec-like functionality with the docker run command by starting a new container in the target container's namespaces:
202+
203+
```bash
204+
docker run -itd --name sidecar --pid container:target --ipc container:target --network container:target alpine sh
205+
```
206+
207+
[Docker Debug](https://docs.docker.com/reference/cli/docker/debug/)
208+
191209
## Resources
192210

193211
- [Docker Containers vs. Kubernetes Pods - Taking a Deeper Look][ix-posts-containers-vs-pods]
@@ -229,8 +247,8 @@ kubectl delete pod node-debugger-debian-11-wrjhs
229247
[ephemeral-ctrs-feature-request]: https://github.com/kubernetes/enhancements/issues/277
230248
[FR: New kubectl command]: https://github.com/kubernetes/kubernetes/issues/45922
231249

232-
[shared-ns-img]: https://raw.githubusercontent.com/AliMehraji/Documents/refs/heads/main/posts/assets/k8s-debug-ctr-in-pod-shared-ns.webP
233-
[after-ns-shared]: https://raw.githubusercontent.com/AliMehraji/Documents/refs/heads/main/posts/assets/ctr-in-pod-shared-pid-ns.WebP
250+
[shared-ns-img]: https://raw.githubusercontent.com/cod3mas0n/Documents/refs/heads/main/posts/assets/k8s-debug-ctr-in-pod-shared-ns.webP
251+
[after-ns-shared]: https://raw.githubusercontent.com/cod3mas0n/Documents/refs/heads/main/posts/assets/ctr-in-pod-shared-pid-ns.WebP
234252

235253
[debugging-profiles]: https://kubernetes.io/docs/tasks/debug/debug-application/debug-running-pod/#debugging-profiles
236254

posts/kubectl-ssa-csa.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: TIL Kubectl CSA/SSA (Client/Server Side Apply)
33
published: true
44
description: digging the server side apply and client side apply
55
tags: 'kubernetes,devops,k8s'
6-
cover_image: 'https://raw.githubusercontent.com/AliMehraji/Documents/refs/heads/main/posts/assets/kubectl-ssa-csa/kubectl-ssa-csa.webp'
6+
cover_image: 'https://raw.githubusercontent.com/cod3mas0n/Documents/refs/heads/main/posts/assets/kubectl-ssa-csa/kubectl-ssa-csa.webp'
77
id: 2566618
88
date: '2025-06-05T14:39:43Z'
99
---
@@ -378,6 +378,6 @@ Kubernetes cluster deployed with Kubespray and added to a rancher cluster manual
378378
[imperative-endpoints]: https://youtu.be/1DWWlcDUxtA?t=638
379379
[field-managers]: https://kubernetes.io/docs/reference/using-api/server-side-apply/#managers
380380
[ssa-in-controller]: https://kubernetes.io/docs/reference/using-api/server-side-apply/#using-server-side-apply-in-a-controller
381-
[cnflicts-image]: https://raw.githubusercontent.com/AliMehraji/Documents/refs/heads/main/posts/assets/kubectl-ssa-csa/conflict.webp
382-
[netshoot-deployment]: https://raw.githubusercontent.com/AliMehraji/Documents/refs/heads/main/posts/assets/kubectl-ssa-csa/manifests/netshoot-deployment.yaml
381+
[cnflicts-image]: https://raw.githubusercontent.com/cod3mas0n/Documents/refs/heads/main/posts/assets/kubectl-ssa-csa/conflict.webp
382+
[netshoot-deployment]: https://raw.githubusercontent.com/cod3mas0n/Documents/refs/heads/main/posts/assets/kubectl-ssa-csa/manifests/netshoot-deployment.yaml
383383
[argocd-and-hpa]: https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/#respect-ignore-difference-configs

posts/python-multistage-offline-dockerfile.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,6 @@ The [Dockerfile][dockerfile-no-new-syntax] with no new syntax and manipulating t
375375
[cache-mount]: https://docs.docker.com/build/cache/optimize/#use-cache-mounts
376376
[copy-virtual-env]: https://pythonspeed.com/articles/multi-stage-docker-python/
377377
[pod-security-context]: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#supplementalgroupspolicy
378-
[dockerfile-no-new-syntax]: https://github.com/AliMehraji/Dockerfiles/blob/main/Offline-Dockerfiles/Dockerfile
378+
[dockerfile-no-new-syntax]: https://github.com/cod3mas0n/Dockerfiles/blob/main/Offline-Dockerfiles/Dockerfile
379379
[secret-mount]: https://docs.docker.com/build/building/secrets/#secret-mounts
380380
[python-env-var-in-dockerfile]: https://dev.to/alimehr75/python-env-variables-in-dockerfile-5920

posts/script-template-in-vim.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Script Template in vim
33
published: true
44
description: Defining a Script Template with files suffix in vim.
55
tags: 'vim,template,script'
6-
cover_image: 'https://raw.githubusercontent.com/AliMehraji/Documents/refs/heads/main/posts/assets/script-template-in-vim/vim-1.webp'
6+
cover_image: 'https://raw.githubusercontent.com/cod3mas0n/Documents/refs/heads/main/posts/assets/script-template-in-vim/vim-1.webp'
77
canonical_url: null
88
id: 2319653
99
date: '2025-03-08T23:05:25Z'
@@ -60,7 +60,7 @@ au bufnewfile *.sh 0r $HOME/.vim/sh_template.temp
6060

6161
`vi Shell_Script.sh`
6262

63-
![Shell Template Header](https://raw.githubusercontent.com/AliMehraji/Documents/refs/heads/main/posts/assets/script-template-in-vim/vim-2.webp)
63+
![Shell Template Header](https://raw.githubusercontent.com/cod3mas0n/Documents/refs/heads/main/posts/assets/script-template-in-vim/vim-2.webp)
6464

6565
**Conclusion:**
6666

0 commit comments

Comments
 (0)