I Created a deployment named blue with the nginx image and 6 replicas using imperative commands
I created using the following commands
kubectl create deployment blue --image=nginx
kubectl scale deployment blue --replicas=6
Now I want to update the deployment using the declarative way by using the following yaml file
apiVersion: apps/v1
kind: Deployment
metadata:
name: blue
spec:
replicas: 6
selector:
matchLabels:
run: nginx
template:
metadata:
labels:
run: nginx
spec:
containers:
- image: nginx
imagePullPolicy: Always
name: nginx
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: color
operator: In
values:
- blue
Please help me how to solve it