minikube   ssh

kubectl exec -it nginx sh

kubectl delete -f

kubectl create -f 

kubectl describe nginx  # nginx is pod name

kubectl scale

# 创建pod的方式:

1. 直接创建pod

2. 通过ReplicationController 或者 Replicaset

3. Deployment

4. Service  # kubectl expose deployment <service name>

kubectl get node/pods/rc/rs/deployment/svc -o wide

# 通过ReplicationController or ReplicaSet创建pod在pod terminate后会自动拉起新的pod, 但是重新拉起后ip会变化,service可以保证ip不变化

posted on 2020-02-07 22:06  Go_Forward  阅读(86)  评论(0编辑  收藏  举报