<#CDR9R5QRG|general> I have an issue with CKA practice test course- Node Affinity Lab question 6. I got an error message complaining line 112 which is where you start the affinity section in the yaml file. I couldn’t figure out what’s wrong. I did exactly what’s showed in the demo. Can anyone help?
Hi @emden Lee,
check the following to complete the lab:
kubectl create deployment blue --image=nginx --dry-run=client -o yaml > blue.yaml
copy the following section from /var/answers/blue-deployment.yaml and put it in blue.yaml :
- key: color
kubectl apply -f blue.yaml
Thanks MAyman, your approach works. But I just don’t know why the approach that was showed in the Solution demon video doesn’t work on me. The solution is like this: The deployment blue was already create on question 4 by the command <kubectl create deployment blue --image=nginx so on question 6, the teacher use these steps: step1 <kubectl get deployment blue -o yaml > blue.yaml Step 2. <vi blue.yaml , update yaml by adding that affinity section. Then I got that error message. It works on teacher but doesn’t work on me.