李明
|
官方介绍
Delpyment演示
minikube start
deployment_nginx.yml apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment labels: app: nginx spec: replicas: 3 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.12.2 ports: - containerPort: 80
kubectl create -f deployment_nginx.yml kubectl get deployment kubectl get rs kubectl get pods
kubectl get deployment -o wide
kubectl set image deployment nginx-deployment nginx=nginx:1.13 kubectl get deployment kubectl get deployment -o wide kubectl get pods
kubectl rollout history deployment nginx-deployment
kubectl rollout undo deployment nginx-deployment
kubectl get node kubectl get node -o wide kubectl expose deployment nginx-deployment --type=NodePort #查看node节点暴露的端口30960 kubectl get svc #进入minikube查看ip地址192.168.99.100 minikube ssh
PS:不管怎么样完成了服务的暴露,具体这个service是什么,暴露的NodePort 是什么东西,下次咱们在详细说一下。
|
2018-10-18 10:48:36