现在伴随着微服务的流行,容器技术得到了快速发展,特别是已容器编排管理的Kubernate,对容器资源的管理非常重要,也是微服务化的前提,今天我们就来整理下常用的kubernate常用命令。
kubectl version
kubectl api-versions
kubectl cluster-info
kubectl get componentstatuses
kubectl get pods --all-namespaces -o wide
kubectl get deployment --all-namespaces -o wide
kubectl get service --all-namespaces
kubectl get namespace
kubectl get node
kubectl exec -it pod_name sh -n senyint
kubectl describe pod pod_name -n namespace_name
kubectl logs -f pod_name -n -namespace_name
/root/show.sh | grep service_name
kubectl create -f *.yaml
kubectl delete -f *.yaml
kubectl delete pod pod_name