Kubernetes Deep Dive Room

Sign Up Free or Log In to participate!

kubectl apply -f ./ping-deploy.yml error: the path “./ping-deploy.yml” does not exist

Step 1: kubectl get nodes


docker-for-desktop Ready master 4h v1.10.11

Cannot find any nodes from the Kubenetes clusters I created on GCP console, why?

Step 2: kubectl apply -f ./ping-deploy.yml

error: the path "./ping-deploy.yml" does not exist

Pls help…cannot follow the demo…

5 Answers

all sorted, need to cd to the right directory in GCP


what is the answer how did you sorted?

An option is:

Download Google Cloud SDK.

Once that is done you will have a "Cloud SDK" folder in your computer directory. If you are running windows it may be in C:UsersUser .

Save "your-file .yml" in that Cloud SDK folder.

In your Cloud SDK, be sure to run the "get-credentials" command. If your not sure what that is, run

 "gcloud container clusters –help" to figure it out.

After that

When you run the command "kubectl apply -f ./your-file.yml" from your downloaded Cloud SDK console it will locate the file.

I hope that helps, my apologies if the explanaition was bad. If I missed anything and/or there is a better way please share.

Quickest Solution

In Cloud Shell (within GCP):
-run ls in home directory
-Click More (top right-corner)
-Upload File (i.e. ping-deploy.yml)
-run ls in home directory (you should see ping-deploy.yml)
-run kubectl apply -f ping-deploy.yml

Proceed as normal.

Please let me know if you have any questions


hi, having severe difficulties with this. I’ve downloaded all the folders within ‘A Cloud Guru – Kubernetes Deep Dive’ from Github desktop to my system drive…still having no joy running the kubectl apply -f .ping-deploy.yaml command


Hi, I fixed this by getting a Google Cloud Platform account (not sure that this was strictly necessary) but anyway, I went to clusters and downloaded the "A Cloud Guru – Kubernetes Deep Dive" set of code to my Google Cloud Platform, then I clicked on the powershell type icon on the top right hand corner and then a shell opened up at the bottom, and then I was able to run the commands in this lecture. Got this working as much by luck as by judgement to be honest. Also downloaded Google Cloud sdk. Wish lecturer had spent the time to do a lecture just on this.


Had the same problem in Google Cloud Platform with executing command "kubectl apply -f .ping-deploy.yml", although I had uploaded those files to my home directory and those were indeed there.

However, I managed to run this command successfully by leaving the " . "- notation out of the command.

For me the right command for this was "kubectl apply -f ping-deploy.yml". Hope this helps someone having similar difficulties. 🙂

You can also clone the git repo that has the files, so you don’t have to download and upload files as manually.

1) git clone https://github.com/ACloudGuru-Resources/Course_Kubernetes_Deep_Dive_NP.git

2) navigate to the directory of the file directory cd Course_Kubernetes_Deep_Dive_NP/lesson-networking

3) run the kubectl apply -f ping-deploy.yml

Gaurav Ramesh

This is the easiest way . I had the same approach and was able to run it the very first time

Krishna Kumar Barik

I’m struggling to execute these command as I’m getting error message- "The connection to the server localhost:8080 was refused – did you specify the right host or port?"

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?