获取集群的基本信息
kubectl cluster-info
kubectl get nodes
kubectl get namespaces
kubectl get deployment --all-namespaces
kubectl get svc --all-namespaces
kubectl get pod
kubectl get pod -o wide --all-namespaces
kubectl logs podName
创建pod或srv
kubectl create -f development.yaml
检查将要运行的 Pod 的资源状况
kubectl describe pod podName
删除 Pod
kubectl delete pod podName
pod有多少副本
kubectl get rc
扩展 Pod
kubectl scale --replicas=3 rc podName
删除
kubectl delete deployment kubernetes-dashboard --namespace=kube-system
kubectl delete svc kubernetes-dashboard --namespace=kube-system
kubectl delete -f kubernetes-dashboard.yaml
进入pod
kubectl exec -ti podName /bin/bash

相关文章:

  • 2022-12-23
  • 2021-11-30
  • 2021-07-03
  • 2021-08-29
  • 2021-05-21
  • 2021-09-04
  • 2021-11-16
  • 2022-02-22
猜你喜欢
  • 2022-12-23
  • 2021-04-24
  • 2021-06-06
  • 2021-12-05
  • 2021-12-09
  • 2021-06-21
  • 2021-08-25
相关资源
相似解决方案