<p>I did kubeinit using the following command (I am trying to setup Kubernetes on RHEL 7.6)</p>

<pre><code>kubeadm init --apiserver-advertise-address=15.217.230.99 --pod-network-cidr=15.232.10.195/27
</code></pre>

<p>I want to use the calico network. Since I can't use 192.168.0.0/16 network, I had to wget the calico.yaml from  <a href="https://docs.projectcalico.org/v3.9/manifests/calico.yaml" rel="nofollow noreferrer">https://docs.projectcalico.org/v3.9/manifests/calico.yaml</a> and then modify CALICO_IPV4POOL_CIDR to have the value 15.232.10.195/27 (First thing is, I don't know if I am doing it correctly here. I am very new to Kubernetes and trying to setup my first ever cluster)
When I try to apply the file using command (as a sudo user):</p>

<pre><code>kubectl apply -f ./calico.yaml
</code></pre>

<p>I get the following error:</p>

<pre><code>unable to recognize "./calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp [::1]:8080: connect: connection refused
unable to recognize "./calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp [::1]:8080: connect: connection refused
unable to recognize "./calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp [::1]:8080: connect: connection refused
unable to recognize "./calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp [::1]:8080: connect: connection refused
unable to recognize "./calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp [::1]:8080: connect: connection refused
unable to recognize "./calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp [::1]:8080: connect: connection refused
unable to recognize "./calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp [::1]:8080: connect: connection refused
unable to recognize "./calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp [::1]:8080: connect: connection refused
unable to recognize "./calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp [::1]:8080: connect: connection refused
unable to recognize "./calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp [::1]:8080: connect: connection refused
unable to recognize "./calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp [::1]:8080: connect: connection refused
unable to recognize "./calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp [::1]:8080: connect: connection refused
unable to recognize "./calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp [::1]:8080: connect: connection refused
unable to recognize "./calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp [::1]:8080: connect: connection refused
unable to recognize "./calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp [::1]:8080: connect: connection refused
unable to recognize "./calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp [::1]:8080: connect: connection refused
unable to recognize "./calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp [::1]:8080: connect: connection refused
unable to recognize "./calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp [::1]:8080: connect: connection refused
unable to recognize "./calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp [::1]:8080: connect: connection refused
unable to recognize "./calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp [::1]:8080: connect: connection refused
unable to recognize "./calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp [::1]:8080: connect: connection refused
unable to recognize "./calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp [::1]:8080: connect: connection refused
unable to recognize "./calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp [::1]:8080: connect: connection refused
</code></pre>

<p>My api server runs on port 6443. That is what I see in my kubeadm join token generated by kubeadm init.</p>

<p>Can someone please correct me where I am making mistakes? 
Is it ok to use any other mask with calico network than 192.168.0.0/16? I can't use that since it is already being used in our network.</p>

<p>I also want to join Windows nodes in addition to linux nodes on my cluster. Is Calico network a correct approach OR recommendation is something else instead. I would like to know before I initialize the network on my cluster so that I can do the right thinhs</p>

<p>Thanks</p>

Andy Johnson
<p>Follow the below steps to overcome this issue:</p>

<pre><code>mkdir -p $HOME/.kube

sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config

sudo chown $(id -u):$(id -g) $HOME/.kube/config
</code></pre>
