Luna Lovegood:
Hi again
It is me again.
I copied the deployment into a yaml and then deleted the deployment.
THen, I added serviceaccount into it.
Now, I get the error rror: error parsing depl.yaml: error converting YAML to JSON: yaml: line 127: did not find expected '-' indicator
I donβt know why this is happening, since I already deleted the deployment, I cannot get back the original deployment either.
Shwetha:
Any specific reason why you deleted the deployment object when you could edit it? You have to lessen the unnecessary steps from the beginning. You wont have a lot of time in CKAD.
Shwetha:
Overall the structure looks ok to me.
Shwetha:
To troubleshoot this, i would suggest creating a yaml definition for the deployment using the --dry-run=client and then adding the changes one by one to the spec. It will help you identify if you have made any indentation errors.
Luna Lovegood:
Yes, I should get into the practise of editting
would have saved a lot of trouble.
Thanks will try with --dry-run=client
jdubeau:
The error is a common but generic error. I get these I forget to indent and add the β-β dash.
jdubeau:
Put the entire yaml file on the board so we can see it.
Luna Lovegood:
thanks for jumping in @jdubeau
This was part of a question in kodecloud that gets expired after an hour.
I was trying this alongside few other tasks.
I tried again after an hour, this time I did k edit
and it worked.
Satbachan Singh:
There is an imperative command to add service account to deployment . You may use that instead of yaml file
Luna Lovegood:
I will look into thaat, thanks Satbachan