Azure-docs: azure-vote.yaml fails validation

Created on 25 Apr 2018  Â·  7Comments  Â·  Source: MicrosoftDocs/azure-docs

Tried several times now, opened vi and pasted from the documentation here the azure-vote.yaml(using the copy button on the page) and saving, then I run:
kubectl create -f azure-vote.yaml
and i get:
error: error validating "azure-vote.yaml": error validating data: apiVersion not set; if you choose to ignore these errors, turn validation off with --
validate=false
if i cat, VI or more the document looks ok . This is in the azure portal bash window after getting credentials successfully.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

assigned-to-author container-servicsvc doc-bug triaged

Most helpful comment

Same issue(Windows 10+ Chrome)

When I copy paste in vi editor in cloud shell, I found "a" was missing from the first line

apiVersion: apps/v1

All 7 comments

@abyys - thanks for raising the issue. I've just run through the steps without issue:

  • New cluster
  • Cloud shell > vi
  • Copied in the YAML using the copy button

Results:

deployment "azure-vote-back" created
service "azure-vote-back" created
deployment "azure-vote-front" created
service "azure-vote-front" created

What browser are you using when copying the YAML?

@abyys - any thoughts on this?

On Thu, 26 Apr 2018 at 16:38, Neil Peterson notifications@github.com
wrote:

@abyys https://github.com/abyys - any thoughts on this?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/MicrosoftDocs/azure-docs/issues/7695#issuecomment-384687606,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIoQ86Rjgua8RzUOTaSAcfStGVMA1uUuks5tsenYgaJpZM4TjmI_
.

Apologies the issue was my side, turns out my keyboard was pressing an
additional key every time I copy and pasted into VI!

@abyys - good to hear, thanks.

please-close

Using Cloud Shell+Nano on Mozilla Firefox on Windows 10, I get this issue too. However, after a bit of troubleshooting, I switched to using Bash on Windows and the same steps work.
I think it's worth investigating what's happening with the Cloud Shell as this is a tad frustrating. I'm available to reproduce the issue, if you'd like.

Same problem here:
weyder@Azure:~/manifests$ kubectl get service azure-vote.yml --watch Error from server (NotFound): services "azure-vote.yml" not found

Mozilla Firefox 61 + Cloudshell Azure Bash and my laptop running Windows 10.

Same issue(Windows 10+ Chrome)

When I copy paste in vi editor in cloud shell, I found "a" was missing from the first line

apiVersion: apps/v1

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spottedmahn picture spottedmahn  Â·  3Comments

jamesgallagher-ie picture jamesgallagher-ie  Â·  3Comments

jharbieh picture jharbieh  Â·  3Comments

bityob picture bityob  Â·  3Comments

jebeld17 picture jebeld17  Â·  3Comments