<p>I start to learn kubernetes. I follow a tutorial but I can't reproduce the step. I just install the kubectl and minikube, start minikube with docker as driver and run a pod.</p>
<pre><code>filip@filip-pc:~/Desktop$ kubectl get pods
NAME        READY   STATUS    RESTARTS   AGE
my-apache   1/1     Running   0          5h7m
my-nging    1/1     Running   0          4h59m
filip@filip-pc:~/Desktop$ kubectl scale --replicas=2 my-apache
error: the server doesn't have a resource type &quot;my-apache&quot;
filip@filip-pc:~/Desktop$ kubectl cluster-info
Kubernetes master is running at https://172.17.0.3:8443
KubeDNS is running at https://172.17.0.3:8443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
</code></pre>
<p>I can se a pod but I can't manage it.
if I follow the link <a href="https://172.17.0.3:8443" rel="nofollow noreferrer">https://172.17.0.3:8443</a> I get an error</p>
<pre><code>{
  &quot;kind&quot;: &quot;Status&quot;,
  &quot;apiVersion&quot;: &quot;v1&quot;,
  &quot;metadata&quot;: {
    
  },
  &quot;status&quot;: &quot;Failure&quot;,
  &quot;message&quot;: &quot;forbidden: User \&quot;system:anonymous\&quot; cannot get path \&quot;/\&quot;&quot;,
  &quot;reason&quot;: &quot;Forbidden&quot;,
  &quot;details&quot;: {
    
  },
  &quot;code&quot;: 403
}
</code></pre>
<p>I do a short research on this error but the solutions that I found don't work for me.
As I mention I am new to kubernetes but I understant that is a privilege issue but the user that I use have rights</p>
<pre><code>filip@filip-pc:~/Desktop$ kubectl auth can-i create deployments --namespace dev
yes
filip@filip-pc:~/Desktop$ kubectl auth can-i create deployments --namespace prod
yes
</code></pre>

<p>Don't know which tutorial you are following and not sure how you created the pod but if it worked for them and it doesn't work for you then the issue is probably in that you are running newer version of kubernetes.</p>
<p>Using <code>kubectl run ...</code> used to create pod as well as replication controller. Nowadays (since 1.18) it only creates a single pod. You need either replication controller (deprecated), or relicaset or deployment in order to scale it. You can't scale a single pod (pod resource doesn't have a concept of replicas that you might scale - increase/decrease).</p>
<p>You can replace the old run command with</p>
<pre><code>kubectl create deployment myapache --image=httpd
</code></pre>
<p>and the scale it with</p>
<pre><code>kubectl scale deployment myapache --replicas=2
</code></pre>
<p>It is not exactly the same as using the old run command but it is close.</p>
