How to tcpdump using ephemeral containers in Kubernetes
In order to use ephemeral containers, the K8S cluster needs to be created using the EphemeralContainers feature gate. This technique makes using tcpdump
inside a pod quite easy without the need to restart or patch a pod or deployment.
Create a cluster enabling EphemeralContainers
The following configuration cluster.yaml
helps installing a K8S cluster using kubeadm
.
apiVersion: kubeadm.k8s.io/v1beta2
kind: InitConfiguration
nodeRegistration…