<p>I'm working through a tutorial on Kubernetes on Azure tutorial (<a href="https://learn.microsoft.com/en-us/azure/aks/tutorial-kubernetes-deploy-application" rel="nofollow noreferrer">here</a>) and everything has worked perfectly until I run the <code>kubectl apply</code> to configure the cluster:</p>

<pre><code>bash-4.4# kubectl apply -f azure-vote-all-in-one-redis.yaml

error: the path "azure-vote-all-in-one-redis.yaml" does not exist
</code></pre>

<p>I found <a href="https://stackoverflow.com/questions/45056575/not-able-to-create-a-file-using-kubectl">this</a> question which is right on point if I were trying to use a URL for the file.  </p>

<p>I've tried:</p>

<pre><code>kubectl apply -f azure-vote-all-in-one-redis.yaml

and

kubectl apply -f /Users/bill/Documents/GitHub/azure-voting-app-redis/azure-vote-all-in-one-redis.yaml
</code></pre>

<p>The <code>kubectl</code> command is run from the AZ CLI (I'm using VSCode - with everything configured for Azure and Docker - no problems seeing anything).</p>

<p>if I <code>ls</code> from the AZ CLI I get:</p>

<pre><code>bash-4.4# ls
azure-cli  dev        home       media      proc       run        srv        tmp        var
bin        etc        lib        mnt        root       sbin       sys        usr
bash-4.4#
</code></pre>

<p>I've also looked through the docs for <code>AZ CLI</code> and <code>kubectl</code> and every indication is that it should simply work.  I also tried <code>kubectl</code> from the <code>console</code> which obviously didn't work...</p>

Bill Armstrong
<p>As I know, most command like this, when you execute the command with an argument file, you should in the same directory which the file in or with an absolute path of the file.</p>

<p>So you can use two ways to execute the command:</p>

<p>First, you can go into the directory which the file azure-vote-all-in-one-redis.yaml in and then execute the command <code>kubectl apply -f azure-vote-all-in-one-redis.yaml</code>. </p>

<p>Second, you can use an absolute path. How to get the path? You can go into the directory and execute the command <code>pwd</code>. Or you can use the command <code>whereis azure-vote-all-in-one-redis.yaml</code> to get the path. </p>

<p><strong>Update</strong></p>

<p>Here is my test screenshot:
<a href="https://i.stack.imgur.com/0fzLc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0fzLc.png" alt="enter image description here"></a></p>

<p>Hope it will help you!</p>
