kubectl exec
Jump to navigation
Jump to search
kubectl exec -it my-redis-pod -- /bin/bash
(Get a shell to a running container (https://kubernetes.io/docs/tasks/debug-application-cluster/get-shell-running-container/))
kubectl exec -it my-redis-pod -c my-redis-container -- /bin/bash
kubectl exec my-redis-pod -c my-redis-container /sbin/killall5 kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead. command terminated with exit code 2
kubectl exec my-redis-pod -c my-redis-container /sbin/killall kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead. OCI runtime exec failed: exec failed: container_linux.go:367: starting container process caused: exec: "/sbin/killall": stat /sbin/killall: no such file or directory: unknown command terminated with exit code 126
Related commands[edit]
Activities[edit]
See also[edit]
kubectl
: [create
|delete
|edit
|apply
|exec
|get
|set
|rolling-update
|rollout
|logs
|run
|auth
|label
|version
|top
|diff
|debug
|replace
|describe
|config
|port-forward
|scale
|rollout
|api-resources
|proxy
|expose deployment
|expose
|get endpoints
|~/.kube/config
|kubectl logs --help
|kubectl --help
- Kubernetes: CKA, CKS, Kubernetes installation, Kubernetes Workloads,
kubeadm
,Kubernetes API
, Kubernetes API Server,kubectl
,kubeadm
,kubelet
, KOPS, Cloud services, Helm, Kubernetes RBAC, Kubernetes deployments, Minikube, Rancher, OpenShift, Charmed Kubernetes, Ingress, Kubernetes timeline, Kubernetes scheduler, Kubernetes logging, Kubernetes operator, Orka,kind: Pod
, Kubernetes namespaces, Changelog/Versions, Kubernetes dashboard, Kubernetes Metrics Server, Field Selectors