Hi guys, I can not get this lab question to work. Why can it not find the expect . . .

Adam Wilkinson:
Hi guys, I can not get this lab question to work. Why can it not find the expected key “color” ?
image.png


image.png

Ravi Shekhar Sinha:
I think it will be “Equal”

Ravi Shekhar Sinha:
though for this simple case you could have better used Node Slector

Adam Wilkinson:
@Ravi Shekhar Sinha thanks just updated it to Equal rather than Equals but get the same message

Ravi Shekhar Sinha:
For affinity I have used “In” operator…

Ravi Shekhar Sinha:
try with node selector or use “In” operator

Ravi Shekhar Sinha:
values will be a list

Adam Wilkinson:
Just tried “In” same message. My answer now matches exactly to the solution video from what I can see…
image.png
image.png

Adam Wilkinson:
Unbelievable I think copying and pasting from the web browser K8s docs templates to the lab console is putting some weird hidden characters :rage:. I deleted everything out and manually typed everything out and it worked

Adam Wilkinson:
Will do some further testing but am i likely to hit issues in the exam copying and pasting?

Tej_Singh_Rana:
Hello, @Adam Wilkinson
You can add set paste in .vimrc file to copy/paste from k8s docs to terminal editor.

Tej_Singh_Rana:
Please read the old discussion, how to make effective set paste https://community.kodekloud.com/t/vim-tip-if-you-are-an-avid-vim-user-and-use-it-extensively-here-is-a-small-t/15022

Adam Wilkinson:
Hi @Tej_Singh_Rana thanks for the awesome help! I am really not sure where I am meant to insert “:set nopaste” it says to put it in “~/.vimrc” what is that and how do i find it?

Tej_Singh_Rana:
.vimrc file is available in user’s home directory. It’s containing dot(.) in the beginning so it’s hidden.
Run the command to list all the hidden files or directories:

$ ls -a 

Tej_Singh_Rana:
You can use set list - Display invisible characters (tabs).
To unset use set nolist