useful commands for Kubernetes beginners

发布时间:2017-1-19 4:10:39 编辑:www.fx114.net 分享查询网我要评论
本篇文章主要介绍了"useful commands for Kubernetes beginners ",主要涉及到useful commands for Kubernetes beginners 方面的内容,对于useful commands for Kubernetes beginners 感兴趣的同学可以参考一下。

useful commands for Kubernetes beginners

Get pod ip and their coordinating NODE

$ kubectl get pods -o wide

If you want to get detailed information about pod, nodes, then you should set output as yaml:

$ kubectl get pods -o json

Show labels about pods under all namespace:

$ kubectl get pods --all-namespaces --show-labels

Dump kubernets cluster infomation

$ kubectl cluster-info dump

Run commands in a pod

$ kubectl exec test-pod -- ls -alh

Attach to a process that is already running inside an existing container.

$ kubectl attach POD -c CONTAINER [options]

Sends stdin to a 'bash' in busybox container from pod busy box and sends stdout/stderr from 'bash' back to the client.

$ kubectl attach busybox -it

Get node information, Kubelet, Kube-proxy version, resource utilisation etc.

$ kubectl describe node ip-172-31-10-199



上一篇:C段渗透攻击必看的技术知识
下一篇:http状态码

相关文章

相关评论