kubectl exec -it etcd-master -n kube-system /bin/bashkubectl exec [POD] [COMMAND]

简介: kubectl exec -it etcd-master -n kube-system /bin/bashkubectl exec [POD] [COMMAND]

异常

[root@node1 ~]# kubectl exec -it  etcd-master  -n kube-system /bin/bash
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl kubectl exec [POD] -- [COMMAND] instead.
OCI runtime exec failed: exec failed: container_linux.go:348: starting container process caused "exec: \"/bin/bash\": stat /bin/bash: no such file or directory": unknown
command terminated with exit code 126

解决:

1.POD没有正常启动

2.容器中没有/bin/bash和/bin/sh命令

相关文章
|
8月前
|
Kubernetes 负载均衡 应用服务中间件
kubectl 命令详细介绍
kubectl 命令详细介绍
|
8月前
|
Kubernetes 容器
Failed at step CHDIR spawning /opt/kubernetes/bin/etcd: No such file or directory
Failed at step CHDIR spawning /opt/kubernetes/bin/etcd: No such file or directory
92 0
|
5月前
|
Kubernetes 容器
Kubernetes(K8S) 安装 Metrics-Server kubectl top (metrics-server) node NotFound
Kubernetes(K8S) 安装 Metrics-Server kubectl top (metrics-server) node NotFound
67 0
|
8月前
|
Kubernetes 网络安全 Docker
master kubelet[22628]: E0919 21:16:24.171522 22628 kubelet.go:2267] node “master“ not found
master kubelet[22628]: E0919 21:16:24.171522 22628 kubelet.go:2267] node “master“ not found
191 2
|
8月前
|
应用服务中间件 nginx 容器
error: a container name must be specified for pod pod-base, choose one of: [nginx busybox]
error: a container name must be specified for pod pod-base, choose one of: [nginx busybox]
103 0
|
8月前
|
Kubernetes 安全 Shell
如何通过 kubectl 进入 node shell
如何通过 kubectl 进入 node shell
|
Kubernetes Linux Shell
minikube安装kubernetes以及start启动报错解决办法:Unable to find image ‘gcr.io/k8s-minikube/kicbase
使用minikubu安装kuburnetes集群,所遇到的问题,以及如何设置。
3082 1
|
Kubernetes Linux Shell
kubectl exec 为什么要加 -it?
kubectl exec 为什么要加 -it?
416 0
zookeeper启动失败:【zkServer.sh status Error contacting service. It is probably not running】
zookeeper启动失败:【zkServer.sh status Error contacting service. It is probably not running】
282 0
zookeeper启动失败:【zkServer.sh status Error contacting service. It is probably not running】
|
Kubernetes Cloud Native 安全
Kubernetes CKS 2021【5】---Cluster Setup - Node Metadata
Kubernetes CKS 2021【5】---Cluster Setup - Node Metadata
Kubernetes CKS 2021【5】---Cluster Setup - Node Metadata