1. Deployment创建和删除
创建Deployment
kubectl create -f test.yaml
删除Deployment
kubectl delete -f test.yaml
kubectl delete deployments *** -n --all-namespaces
2. Service的创建查看
查看
kubectl get services --all-namespaces
创建
kubectl create -f test.yaml
删除
kubectl delete service *** -n default
3. pod的查看,删除
# pod的查看
kubectl get pod --all-namespaces
kubectl get pod --all-namespaces -o wide (查看更多的信息)
4. 查看k8s日志
journalctl -f -u kubelet.service
5. 查看pod节点的状态
kubectl describe pod kube-flannel-ds-amd64-zfkgl -n kube-system