Lab 3: Deployment

Kubernetes (K8s)
This entry is part 4 of 6 in the series Học Kubernetes

B1: Tạo file yaml với nội dung sau đây

B2: Tạo deployment từ file yaml trên với câu lệnh sau

B3: kiểm tra deployment đã tạo

B4: kiểm tra pod đã được tạo

B5: Xem thông tin replica đã tạo

B6: xem thông tin deployment đã tạo

Update và Rollback

Một số command hay dùng:

  • Create: kubectl create -f deployment.yml
  • Get: kubectl get deployments
  • Update:
    • Kubectl apply -f deployment.yml
    • Kubectl set image deployment/myapp-deployment nginx=nginx:1.9.1
  • Status:
    • Kubectl rollout status deployment/myapp-deployment
    • Kubectl rollout history deployment/myapp-deployment
  • Rollback: kubectl rollout undo deployment/myapp-deployment
Series Navigation<< Lab 2: ReplicateLab 4: Service – NodePort >>

Leave a Reply

Your email address will not be published. Required fields are marked *