minikube---kubectl常用命令

  1. 创建service与pods类似不再重复

    • 创建Pods
      kubectl create -f development.yaml
      kubectl run nginx --image=nginx --port=8080
    • 删除Pods(切记namespace这个坑)
      kubectl delete deploy/nginx -n test
      kubectl delete -f development
    • 更新Pods
      kubectl replace -f development
      kubectl replace --force -f development强制更新
    • Pods日志
      kubectl logs $pods_name -n test (-n代表namespace)
    • Pods exec
      kubectl exec $pods_name -it -n test -- /bin/sh
      -pods/service describe
      kubectl describe pod/$pods_name -n test
      kubectl describe deploy/$deploy_name -n test
      kubectl describe service/$service_name -n test

你可能感兴趣的:(minikube---kubectl常用命令)