Forum archive › Kubernetes & Helm Charts
ArchiveCreate Debugging / Investigation Pod for Cluster problems
Problem
User wants to debug the kubernetes environment to check issues such as timeouts, dns errors etc
#Pull and Install a latest ubuntu pod
cat <<EOF | kubectl apply -f –
apiVersion: v1
kind: Pod
metadata:
name: ubuntu
namespace: cert-manager
labels:
app: ubuntu
spec:
containers:
– image: ubuntu
command:
– “sleep”
– “604800”
imagePullPolicy: IfNotPresent
name: ubuntu
restartPolicy: Always
Note: Change your namespace according to your needs ( no namespace = default )
Login to your pod
kubectl exec -it ubuntu -n cert-manager /bin/bash
Update System and install utils
apt install iputils-ping traceroute dnsutils tcpdump nmap curl wget jq python3.10 strace ssh telnet
Check Issues with resources in your cluster
Example:
kubectl exec -it ubuntu -n cert-manager /bin/bash
nslookup cert-manager-webhook
Attachment: commands.txt
We do this for a living.
Kubernetes, DevOps and platform engineering, delivered in days — not another weekend lost to a stack trace.
Start a project →