Hi Team I have follow up question I am missing the indentation (space before the . . .

Pamela Ghosh:
Hi Team I have follow up question I am missing the indentation (space before the objects) do we have any easy way to practice it? Thank you.

Vitor Jr.:
Hi @Pamela Ghosh did you finished the YAML lessons and labs?

Pamela Ghosh:
@Vitor Jr. Hi Victor yes , like right now even after I copied the affinity from the link you provided I am getting an error while creting the deployment file “error: error parsing re-deployment.yaml: error converting YAML to JSON: yaml: line 24: did not find expected key” but I feel my file is good. Attached is the screen shot.

Vitor Jr.:
Did you had a chance with vim before? Most of the time is some indentation or some tab that should be an espace.

Vitor Jr.:
@Pamela Ghosh before you start the task, try to run this (maybe it will make your vim work better)

echo 'set tabstop=2
set expandtab
set shiftwidth=2' >> ~/.vimrc

Alistair Mackay:
You have your indentation all messed up! YAML is very fussy about this, as proper indentation is part of the syntax (somewhat like Python)

Most of your indentation level is 2 spaces, but after nodeAffinity you have gone to one space - it won’t like that.

Also ensure you don’t mix spaces and tabs. That too will cause errors.

Also be careful when pasting into vim - ensure it is in INSERT (paste) mode or strange things can happen. Once pasted, turn off paste mode or you might start getting tabs when you don’t want them from the tab key.

Pamela Ghosh:
@Vitor Jr.: Thank you I have done the setup before staring my lab , just a question since I am beginner what does these set of command do ?

Pamela Ghosh:
@Alistair Mackay Thank you for identifying the issue , I am practicing but somehow I am poor at indentation looks like.

Pamela Ghosh:
Thank you finally I figured out and started counting learned heard way but worked for the first chance :slightly_smiling_face:.

unnivkn:
Hi… @Pamela Ghosh you can try this too:
vim deploy.yaml
:24
:set list
you can find some junk character … remove it , save and try again.
if there are many junk character, then try this(replacing TAB character with 2-space’s from the entire file):
:%s/\t/ /g

unnivkn:
https://stackoverflow.com/questions/69998/tabs-and-spaces-in-vim