Was following your demo of Kubernetes, where you deployed 3 node cluster and deploys manifest file ping-deploy.yml (from Github).
I fetched file on GKE engine and executed the same command, but getting the following error:
atulrd@cloudshell:~ (kubernetes-demo-project-230110)$ kubectl apply -f .ping-deploy.yml
error: the path ".ping-deploy.yml" does not exist
Pls, note file is available on the same path (/home/atulrd) from where the command is executed.
2. If I execute the following command:
Can you pls help here?
as per @rk295 – Nigel is using PS hence the . if you’re using Linux based CLI then its ./
you can just do ”’kubectl apply -f ping-deploy.yml”’
if you are in the same directory as the file regardless if you are in Windows/Linux/Mac.
if you are in Linux/Mac and not in the same directory, then you have to specify the path either a relative/absolute the Linux/Mac way using forward slashes "/" and in windows using the backward slash ""
As stated by the other guys, Linux uses forward slashes "/" instead of backslashes "". Re the YAML problem… I’ve had a look at the YAML file in the coure’s GH repo and there’s nowhere near 528 lines. Is it possible that there’s been a formatting error when "fetching" the file to the cloudshell?