<p>I was running kubectl command to deploy my application in the gcloud. But suddenly the kubectl command stopped working. <code>kubectl</code> command is working fine but for everything else it say command not found.</p>

<p><code>kubectl create
bash: kubectl create: command not found
</code></p>

<p><code>kubectl run
bash: kubectl run: command not found
</code></p>

<pre><code>SBGML02586:~ mku01$ kubectl
kubectl controls the Kubernetes cluster manager. 

Find more information at: https://kubernetes.io/docs/reference/kubectl/overview/

Basic Commands (Beginner):
  create         Create a resource from a file or from stdin.
  expose         Take a replication controller, service, deployment or pod and
expose it as a new Kubernetes Service
  run            Run a particular image on the cluster
  set            Set specific features on objects......
</code></pre>

krmanish007
<p>I had a similar error when I was setting up Kubernetes on Linux for the first time:</p>
<p>When I try to run the commands:</p>
<pre><code>kubectl cluster-info
kubectl version
</code></pre>
<p>I get the error:</p>
<pre><code>-bash: kubectl: command not found
</code></pre>
<p><strong>Here's how I fixed it</strong>:</p>
<p>Download the latest Kubernetes release with the command:</p>
<pre><code>curl -LO &quot;https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl&quot;
</code></pre>
<p>Make the kubectl binary executable:</p>
<pre><code>chmod +x ./kubectl
</code></pre>
<p>Move the binary in to your PATH:</p>
<pre><code>sudo mv ./kubectl /usr/local/bin/kubectl
</code></pre>
<p>Test to ensure the version you installed is up-to-date:</p>
<pre><code>kubectl cluster-info
kubectl version
</code></pre>
<p>You can read up more about it in the Kubernetes Official Docs: <a href="https://kubernetes.io/docs/tasks/tools/install-kubectl/" rel="noreferrer">Install and Set Up kubectl</a></p>
<p>That's all.</p>
<p><strong>I hope this helps</strong></p>
