[root@node01~]# kubectl get ns kube-flannel -o json{"apiVersion":"v1","kind":"Namespace","metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"v1\",\"kind\":\"Namespace\",\"metadata\":{\"annotations\":{},\"labels\":{\"pod-securit...
[[email protected] tmp]# kubectl get pods -o wide NAME READY STATUS RESTARTS AGE IP NODE nginx-2476590065-74tpk 1/1 Running 0 17s 172.200.26.2 192.168.32.132[[email protected] tmp]# kubectl get deployments -o wide NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE nginx 1 1 1 1 27s 执行s...
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE nginx-app 1 1 1 1 2m $ kubectl get po -l run=nginx-app NAME READY STATUS RESTARTS AGE nginx-app-2883164633-aklf7 1/1 Running 0 2m $ kubectl delete deployment nginx-app deployment "nginx-app" deleted $ kubectl get po -l run=nginx-app ...
thirdpartyresources kubectl describe 确认node详细信息 一般使用get命令取得node信息,然后使用describe确认详细信息。 [root@ku8-1tmp]# kubectl get nodesNAME STATUS AGE192.168.32.132Ready6h192.168.32.133Ready6h192.168.32.134Ready6h [root@ku8-1tmp]# kubectl describe node 192.168.32.132Name:192.168.32.132Role:...
containers[] .securityContext .capabilities .drop Reducing kernel capabilities available to a container limits its attack surface 4. containers[] .securityContext .runAsUser > 10000 Run as a high-UID user to avoid conflicts with the host's user table 5. containers[] .securityContext .capabilities...
get显示一个或更多 resources edit 在服务器上编辑一个资源 delete 根据filenames, stdin, resources and names, or by resources and label selector删除资源 Deploy Commands: rollout Manage the rollout of a resource scale 为 Deployment, ReplicaSet, Replication Controller 或者 Job 设置一个新的副本数量 ...
get显示一个或更多 resources edit 在服务器上编辑一个资源 delete 根据filenames, stdin, resources and names, or by resources and label selector删除资源 Deploy Commands: rollout Manage the rollout of a resource scale 为 Deployment, ReplicaSet, Replication Controller 或者 Job 设置一个新的副本数量 ...
alias kgp='kubectl get pods' alias kgpa='kubectl get pods --all-namespaces' alias kgd='kubectl get deployments' alias kgs='kubectl get service' alias kgh='kubectl get hpa' # Delete resources alias kd='kubectl delete' alias kdp='kubectl delete pods' ...
17.6 [root@master ~]# kubectl get pod No resources found in default namespace. [root@master ~]# kubectl get namespaces NAME STATUS AGE default Active 9h kube-node-lease Active 9h kube-public Active 9h kube-system Active 9h [root@master ~]# kubectl -n kube-system get pod NAME READY...
比如到每一个worker上ping一个走primary网络的远端IP,其中的ping可以换成人和想执行的命令比如ip route get <IP>等: ###左右滑动 for i in `kubectl get node --no-headers| awk '{print $1}'`;do echo $i; ssh -q `kubectl get node $i -o jsonpath='{.status.addresses[0].address}'` "ping...