Create a dummy pod and connect to it. Using dummy.yaml from Kubernetes.
Busybox has no /bin/bash
, so /bin/sh
must be used.
cat pods/dummy.yaml
[..]
metadata:
name: hello
[..]
kubectl apply -f pods/dummy.yaml
#make sure pod is running
#wide -A: show IPs of pods/containers
kubectl get pods -o wide -A
#some information on pod
kubectl describe pods hello
#check logs (says something like Hello Kubernets!)
kubectl logs hello
#connect to running pod
kubectl exec --stdin --tty hello -- /bin/sh
Attached Files | ||