title | description |
---|---|
Kubernetes Deployments with YAML |
Learn to write and test Kubernetes Deployments with YAML |
- Copy templates from ReplicaSet and change the
kind: Deployment
- Update Container Image version to
3.0.0
- Change all names to Deployment
- Change all labels and selectors to
myapp3
# Change Directory
cd kube-manifests
# Create Deployment
kubectl apply -f 01-deployment-definition.yml
kubectl get deploy
kubectl get rs
kubectl get po
# Create LoadBalancer Service
kubectl apply -f 02-deployment-LoadBalancer-service.yml
# List Service
kubectl get svc
# Get Public IP
kubectl get nodes -o wide
# Access Application
http://<Load-Balancer-Service-IP>
# Change Directory
cd kube-manifests
# Delete Deployment
kubectl delete -f 01-deployment-definition.yml
# Delete LoadBalancer Service
kubectl delete -f 02-deployment-LoadBalancer-service.yml