Complete the code to create a new deployment named 'green' in Kubernetes.
kubectl create deployment [1] --image=nginx:latestThe new deployment for the green environment should be named 'green' to distinguish it from the blue environment.
Complete the code to switch the service to point to the green deployment.
kubectl patch service my-service -p '{"spec": {"selector": {"app": "[1]"}}}'
To switch traffic to the green deployment, update the service selector to 'green'.
Fix the error in the command to delete the old blue deployment.
kubectl delete deployment [1]To remove the old environment, delete the 'blue' deployment after switching traffic.
Fill both blanks to create a service that routes traffic to the blue deployment.
kubectl expose deployment [1] --port=[2] --target-port=80
The service should expose the 'blue' deployment on port 80 to route traffic correctly.
Fill all three blanks to create a deployment with label 'app=green' and image 'nginx:stable'.
kubectl create deployment [1] --image=[2] --dry-run=client -o yaml | kubectl set [3] app=[1] -f - --local -o yaml
Create the 'green' deployment with the stable nginx image and add the label 'app=green' using 'kubectl set label'.