# The connection to the server localhost:8080 was refused - did you specify the right host or port?

**URL:** <https://discuss.kubernetes.io/t/the-connection-to-the-server-localhost-8080-was-refused-did-you-specify-the-right-host-or-port/1464>\
**Category:** General Discussions\
**Created:** [August 13, 2018, 6:54am UTC](https://discuss.kubernetes.io/t/the-connection-to-the-server-localhost-8080-was-refused-did-you-specify-the-right-host-or-port/1464 "2018-08-13T06:54:18Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![hemanth22](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/hemanth22/32/791_2.png) [@hemanth22](https://discuss.kubernetes.io/u/hemanth22)\
**Post date:** [August 13, 2018, 6:54am UTC](https://discuss.kubernetes.io/t/the-connection-to-the-server-localhost-8080-was-refused-did-you-specify-the-right-host-or-port/1464/1 "2018-08-13T06:54:18Z")

</div>

Hello team,

I have installed kubernetes in centos.  
After installation when i was checking the version with below command.

```
kubectl version -o json

```

I am getting error below along with version information.

```
{
  "clientVersion": {
    "major": "1",
    "minor": "11",
    "gitVersion": "v1.11.2",
    "gitCommit": "bb9ffb1654d4a729bb4cec18ff088eacc153c239",
    "gitTreeState": "clean",
    "buildDate": "2018-08-07T23:17:28Z",
    "goVersion": "go1.10.3",
    "compiler": "gc",
    "platform": "linux/amd64"
  }
}

```

The connection to the server localhost:8080 was refused - did you specify the right host or port?

Can you please check and advise.

Thanks,  
Hemanth.

---

<div class="post-metadata">

**Author:** ![elp](https://avatars.discourse-cdn.com/v4/letter/e/7c8e57/32.png) [@elp](https://discuss.kubernetes.io/u/elp)\
**Post date:** [August 13, 2018, 12:55pm UTC](https://discuss.kubernetes.io/t/the-connection-to-the-server-localhost-8080-was-refused-did-you-specify-the-right-host-or-port/1464/2 "2018-08-13T12:55:46Z")

</div>

Hi.  
Check that the api server is actually running and hasn’t crashed:

```auto
docker ps | grep kube-apiserver

```

But the most likely problem and the one that usually gets me is that you don’t have a .kube directory with the right config in it. Try this:

```auto
  mkdir -p $HOME/.kube
  sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
  sudo chown $(id -u):$(id -g) $HOME/.kube/config

```

---

<div class="post-metadata">

**Author:** ![hemanth22](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/hemanth22/32/791_2.png) [@hemanth22](https://discuss.kubernetes.io/u/hemanth22)\
**Post date:** [August 14, 2018, 5:50am UTC](https://discuss.kubernetes.io/t/the-connection-to-the-server-localhost-8080-was-refused-did-you-specify-the-right-host-or-port/1464/3 "2018-08-14T05:50:01Z")

</div>

I have checked with below command

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

it is throwing below error.

cp: cannot stat ‘/etc/kubernetes/admin.conf’: No such file or directory

and i have check below, i could see it still running.

```
kubectl cluster-info
Kubernetes master is running at http://localhost:8080

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
The connection to the server localhost:8080 was refused - did you specify the right host or port?

```

but when i use curl localhost:8080 it is throwing below error.

curl localhost:8080  
curl: (7) Failed connect to localhost:8080; Connection refused

---

<div class="post-metadata">

**Author:** ![wscott](https://avatars.discourse-cdn.com/v4/letter/w/9f8e36/32.png) [@wscott](https://discuss.kubernetes.io/u/wscott)\
**Post date:** [August 21, 2018, 7:30pm UTC](https://discuss.kubernetes.io/t/the-connection-to-the-server-localhost-8080-was-refused-did-you-specify-the-right-host-or-port/1464/4 "2018-08-21T19:30:20Z")

</div>

I’m encountering the same issue.

> ```
> user@sqa02:/etc/kubernetes$ mkdir -p $HOME/.kube
> user@sqa02:/etc/kubernetes$ sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
> cp: cannot stat '/etc/kubernetes/admin.conf': No such file or directory
> 
> ```

> ```
> root@sqa03:~# kubectl cluster-info
> Kubernetes master is running at http://localhost:8080
> 
> To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
> The connection to the server localhost:8080 was refused - did you specify the right host or port?
> 
> ```

> ```
> root@sqa03:~# curl localhost:8080
> curl: (7) Failed to connect to localhost port 8080: Connection refused
> 
> ```

To reproduce, follow the instructions provided on this [techrepublic](https://www.techrepublic.com/article/how-to-quickly-install-kubernetes-on-ubuntu/) article.

---

<div class="post-metadata">

**Author:** ![MichaelShi](https://avatars.discourse-cdn.com/v4/letter/m/3ec8ea/32.png) [@MichaelShi](https://discuss.kubernetes.io/u/MichaelShi)\
**Post date:** [January 10, 2019, 3:16am UTC](https://discuss.kubernetes.io/t/the-connection-to-the-server-localhost-8080-was-refused-did-you-specify-the-right-host-or-port/1464/5 "2019-01-10T03:16:29Z")

</div>

Hi there ,  
any update on this ? I have the same problem now for this when i install minikube on Ubuntu 18.04 .

BR

---

<div class="post-metadata">

**Author:** ![mrbobbytables](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/mrbobbytables/32/7_2.png) [@mrbobbytables](https://discuss.kubernetes.io/u/mrbobbytables)\
**Post date:** [January 10, 2019, 12:40pm UTC](https://discuss.kubernetes.io/t/the-connection-to-the-server-localhost-8080-was-refused-did-you-specify-the-right-host-or-port/1464/6 "2019-01-10T12:40:20Z")

</div>

That error should only come up if you have no contexts configured in your client. If you run `kubectl config view` and you get something like this:

```auto
$ kubectl config view
apiVersion: v1
clusters: []
contexts: []
current-context: ""
kind: Config
preferences: {}
users: []

```

Then no contexts are configured.

---

<div class="post-metadata">

**Author:** ![E\_Diaz](https://avatars.discourse-cdn.com/v4/letter/e/df705f/32.png) [@E\_Diaz](https://discuss.kubernetes.io/u/E_Diaz)\
**Post date:** [January 16, 2019, 7:53am UTC](https://discuss.kubernetes.io/t/the-connection-to-the-server-localhost-8080-was-refused-did-you-specify-the-right-host-or-port/1464/7 "2019-01-16T07:53:50Z")

</div>

I have the same error, I tried running  
kubectl config view  
and I got the following:  
apiVersion: v1  
clusters:

- cluster:  
insecure-skip-tls-verify: true  
server: [https://localhost:6443](https://localhost:6443)  
name: docker-for-desktop-cluster  
contexts:
- context:  
cluster: docker-for-desktop-cluster  
user: docker-for-desktop  
name: docker-for-desktop  
current-context: docker-for-desktop  
kind: Config  
preferences: {}  
users:
- name: docker-for-desktop  
user:  
client-certificate-data: REDACTED  
client-key-data: REDACTED

---

<div class="post-metadata">

**Author:** ![E\_Diaz](https://avatars.discourse-cdn.com/v4/letter/e/df705f/32.png) [@E\_Diaz](https://discuss.kubernetes.io/u/E_Diaz)\
**Post date:** [January 16, 2019, 7:54am UTC](https://discuss.kubernetes.io/t/the-connection-to-the-server-localhost-8080-was-refused-did-you-specify-the-right-host-or-port/1464/8 "2019-01-16T07:54:52Z")

</div>

I tried running the command you suggested. Do you have any further suggestions?

---

<div class="post-metadata">

**Author:** ![rata](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/rata/32/18244_2.png) [@rata](https://discuss.kubernetes.io/u/rata)\
**Post date:** [January 16, 2019, 11:51am UTC](https://discuss.kubernetes.io/t/the-connection-to-the-server-localhost-8080-was-refused-did-you-specify-the-right-host-or-port/1464/9 "2019-01-16T11:51:05Z")

</div>

This seems like another way to setup the cluster that said on the post ([https://www.techrepublic.com/article/how-to-quickly-install-kubernetes-on-ubuntu/](https://www.techrepublic.com/article/how-to-quickly-install-kubernetes-on-ubuntu/)). Or is it using the same steps?

Getting kubectl to run really depends on how you installed it. Basically, if you install and have a proper config file, it should always work. So, either an old file from a previous installation is there or something silly like that (although usually difficult to spot).

Also, make sure the commands don’t fail (some on the post pasted that the step to copy the kubectl config failed). That is the way to authorize to the cluster, so it won’t never work if that step doesn’t work 🙂

If I were you, I’d try removing everything from a previous run and starting from scratch and making sure nothing fails. If it does fail, try to fix that instead of continuing with the next steps. And if you can’t fix it, please report back with the steps you did, why it failed (the error) and what you tried and didn’t work.

This way it will be easier to solve 🙂

---

<div class="post-metadata">

**Author:** ![prabhushan](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/prabhushan/32/2045_2.png) [@prabhushan](https://discuss.kubernetes.io/u/prabhushan)\
**Post date:** [February 11, 2019, 12:01pm UTC](https://discuss.kubernetes.io/t/the-connection-to-the-server-localhost-8080-was-refused-did-you-specify-the-right-host-or-port/1464/10 "2019-02-11T12:01:28Z")

</div>

This really helped. Thank you. I am running K8s 1.13.3 installed via Kubespray 2.7

---

<div class="post-metadata">

**Author:** ![sprab](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@sprab](https://discuss.kubernetes.io/u/sprab)\
**Post date:** [August 11, 2019, 8:13pm UTC](https://discuss.kubernetes.io/t/the-connection-to-the-server-localhost-8080-was-refused-did-you-specify-the-right-host-or-port/1464/11 "2019-08-11T20:13:25Z")

</div>

Run these commands to fix it.

sudo cp /etc/kubernetes/admin.conf HOME/ sudo chown (id -u):$(id -g) $HOME/admin.conf  
export KUBECONFIG=$HOME/admin.conf

---

<div class="post-metadata">

**Author:** ![Niranjan\_Alur](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/niranjan_alur/32/3735_2.png) [@Niranjan\_Alur](https://discuss.kubernetes.io/u/Niranjan_Alur)\
**Post date:** [September 21, 2019, 4:37am UTC](https://discuss.kubernetes.io/t/the-connection-to-the-server-localhost-8080-was-refused-did-you-specify-the-right-host-or-port/1464/12 "2019-09-21T04:37:57Z")

</div>

Below commands solved the problem for me.  
mkdir ~/.kube  
vim ~/.kube/config  
and copy the config file from mster node to nodes config file

---

<div class="post-metadata">

**Author:** ![Antonio\_Almeida](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/antonio_almeida/32/3182_2.png) [@Antonio\_Almeida](https://discuss.kubernetes.io/u/Antonio_Almeida)\
**Post date:** [May 28, 2020, 3:43am UTC](https://discuss.kubernetes.io/t/the-connection-to-the-server-localhost-8080-was-refused-did-you-specify-the-right-host-or-port/1464/13 "2020-05-28T03:43:13Z")

</div>

Bom dia

Im beggining my studies in Kubernets, follow the tutorial ([Install and Set Up kubectl - Kubernetes](https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl-on-linux)) and when type “kubectl cluster-info” I receive the message “To further debug and diagnose cluster problems, use ‘kubectl cluster-info dump’.  
The connection to the server localhost:8080 was refused - did you specify the right host or port?”.  
When I run kubectl cluster-info dump receive the message "  
The connection to the server localhost:8080 was refused - did you specify the right host or port?"  
The documentation I found tells to search the file admin.conf at folder /etc/kubernets, but when I do it I didn’t find the folder.  
What can I do?

---

<div class="post-metadata">

**Author:** ![DrZapps](https://avatars.discourse-cdn.com/v4/letter/d/839c29/32.png) [@DrZapps](https://discuss.kubernetes.io/u/DrZapps)\
**Post date:** [July 22, 2020, 12:02pm UTC](https://discuss.kubernetes.io/t/the-connection-to-the-server-localhost-8080-was-refused-did-you-specify-the-right-host-or-port/1464/14 "2020-07-22T12:02:11Z")

</div>

I have currently started working on this as well and I am running into the same brickwall.  
I am running two nodes, one master and the other host.  
Both are VMs running CentOS in Oracle Virtual Manager.

I got docker installed to the host and kubectl installed to master.  
I can ssh from master to host and visa-verse. I receive ping replies as well. But cannot telnet into any of the machines from my physical Windows machine.

When it comes to “kubectl get nodes” I receive the error: The connection to the server x.x.x.x:6443 was refused - did you specify the right host or port?  
~]$ kubectl config view  
apiVersion: v1  
clusters:

- cluster:  
certificate-authority-data: DATA+OMITTED  
server: [https://x.x.x.x:6443](https://x.x.x.x:6443)  
name: local  
contexts:
- context:  
cluster: local  
user: kube-admin-local  
name: local  
current-context: local  
kind: Config  
preferences: {}  
users:
- name: kube-admin-local  
user:  
client-certificate-data: REDACTED  
client-key-data: REDACTED

I have added the IP address+port to the iptables, tried again. stop the firewalld but still got the same error.

---

<div class="post-metadata">

**Author:** ![Debadatta\_Prasad](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/debadatta_prasad/32/5836_2.png) [@Debadatta\_Prasad](https://discuss.kubernetes.io/u/Debadatta_Prasad)\
**Post date:** [September 9, 2020, 4:06pm UTC](https://discuss.kubernetes.io/t/the-connection-to-the-server-localhost-8080-was-refused-did-you-specify-the-right-host-or-port/1464/15 "2020-09-09T16:06:14Z")

</div>

You missed initialising

```auto
sudo kubeadm init --pod-network-cidr=10.244.0.0/16

```

---

<div class="post-metadata">

**Author:** ![AqueeluddinKhaja](https://avatars.discourse-cdn.com/v4/letter/a/6a8cbe/32.png) [@AqueeluddinKhaja](https://discuss.kubernetes.io/u/AqueeluddinKhaja)\
**Post date:** [September 30, 2020, 7:49am UTC](https://discuss.kubernetes.io/t/the-connection-to-the-server-localhost-8080-was-refused-did-you-specify-the-right-host-or-port/1464/16 "2020-09-30T07:49:20Z")

</div>

Make sure you are executing the command from the right user.

---

<div class="post-metadata">

**Author:** ![frank378](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/frank378/32/6122_2.png) [@frank378](https://discuss.kubernetes.io/u/frank378)\
**Post date:** [October 28, 2020, 1:10pm UTC](https://discuss.kubernetes.io/t/the-connection-to-the-server-localhost-8080-was-refused-did-you-specify-the-right-host-or-port/1464/17 "2020-10-28T13:10:03Z")

</div>

Yes I had to be sure I used the “right user”. For me that was a user that had the admin.conf file copied to ~/.kube/config.

You can see the difference between the working “pi” users and the “root” user who does not have the config file:

```auto
pi@node0:~ $ sudo kubectl get pods --all-namespaces
The connection to the server localhost:8080 was refused - did you specify the right host or port?
pi@node0:~ $ kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-f9fd979d6-jjsjr 1/1 Running 0 11h
kube-system coredns-f9fd979d6-xl5f2 1/1 Running 0 11h
kube-system etcd-node0 1/1 Running 0 11h
kube-system kube-apiserver-node0 1/1 Running 0 11h
kube-system kube-controller-manager-node0 1/1 Running 0 11h
kube-system kube-flannel-ds-arm-4zq4g 1/1 Running 0 11h
kube-system kube-flannel-ds-arm-dcprj 1/1 Running 0 11h
kube-system kube-flannel-ds-arm-fwzkl 1/1 Running 0 11h
kube-system kube-flannel-ds-arm-q8t5k 1/1 Running 0 11h
kube-system kube-proxy-dlhc7 1/1 Running 0 11h
kube-system kube-proxy-glh92 1/1 Running 0 11h
kube-system kube-proxy-jh26p 1/1 Running 0 11h
kube-system kube-proxy-qflcw 1/1 Running 0 11h
kube-system kube-scheduler-node0 1/1 Running 0 11h

```

---

<div class="post-metadata">

**Author:** ![Brian\_Ahern](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/brian_ahern/32/6181_2.png) [@Brian\_Ahern](https://discuss.kubernetes.io/u/Brian_Ahern)\
**Post date:** [November 4, 2020, 12:41pm UTC](https://discuss.kubernetes.io/t/the-connection-to-the-server-localhost-8080-was-refused-did-you-specify-the-right-host-or-port/1464/18 "2020-11-04T12:41:10Z")

</div>

Thanks AqueeluddinKhaja. I dropped the sudo and it worked.

---

<div class="post-metadata">

**Author:** ![Jiri\_Benes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/jiri_benes/32/6475_2.png) [@Jiri\_Benes](https://discuss.kubernetes.io/u/Jiri_Benes)\
**Post date:** [December 14, 2020, 10:01pm UTC](https://discuss.kubernetes.io/t/the-connection-to-the-server-localhost-8080-was-refused-did-you-specify-the-right-host-or-port/1464/19 "2020-12-14T22:01:28Z")

</div>

execute command:  
sudo kubeadm init

I’ve got this output:  
(base) jiribenes:~$ sudo kubeadm init  
[sudo] password for jiribenes:  
[init] Using Kubernetes version: v1.20.0  
[preflight] Running pre-flight checks  
[WARNING Firewalld]: firewalld is active, please ensure ports [6443 10250] are open or your cluster may not function correctly  
[preflight] Pulling images required for setting up a Kubernetes cluster  
[preflight] This might take a minute or two, depending on the speed of your internet connection  
[preflight] You can also perform this action in beforehand using ‘kubeadm config images pull’  
[certs] Using certificateDir folder “/etc/kubernetes/pki”  
[certs] Generating “ca” certificate and key  
[certs] Generating “apiserver” certificate and key  
[certs] apiserver serving cert is signed for DNS names [kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local rurhelena1920] and IPs [10.96.0.1 172.30.147.238]  
[certs] Generating “apiserver-kubelet-client” certificate and key  
[certs] Generating “front-proxy-ca” certificate and key  
[certs] Generating “front-proxy-client” certificate and key  
[certs] Generating “etcd/ca” certificate and key  
[certs] Generating “etcd/server” certificate and key  
[certs] etcd/server serving cert is signed for DNS names [localhost rurhelena1920] and IPs [172.30.147.238 127.0.0.1 ::1]  
[certs] Generating “etcd/peer” certificate and key  
[certs] etcd/peer serving cert is signed for DNS names [localhost rurhelena1920] and IPs [172.30.147.238 127.0.0.1 ::1]  
[certs] Generating “etcd/healthcheck-client” certificate and key  
[certs] Generating “apiserver-etcd-client” certificate and key  
[certs] Generating “sa” key and public key  
[kubeconfig] Using kubeconfig folder “/etc/kubernetes”  
[kubeconfig] Writing “admin.conf” kubeconfig file  
[kubeconfig] Writing “kubelet.conf” kubeconfig file  
[kubeconfig] Writing “controller-manager.conf” kubeconfig file  
[kubeconfig] Writing “scheduler.conf” kubeconfig file  
[kubelet-start] Writing kubelet environment file with flags to file “/var/lib/kubelet/kubeadm-flags.env”  
[kubelet-start] Writing kubelet configuration to file “/var/lib/kubelet/config.yaml”  
[kubelet-start] Starting the kubelet  
[control-plane] Using manifest folder “/etc/kubernetes/manifests”  
[control-plane] Creating static Pod manifest for “kube-apiserver”  
[control-plane] Creating static Pod manifest for “kube-controller-manager”  
[control-plane] Creating static Pod manifest for “kube-scheduler”  
[etcd] Creating static Pod manifest for local etcd in “/etc/kubernetes/manifests”  
[wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory “/etc/kubernetes/manifests”. This can take up to 4m0s  
[apiclient] All control plane components are healthy after 18.503678 seconds  
[upload-config] Storing the configuration used in ConfigMap “kubeadm-config” in the “kube-system” Namespace  
[kubelet] Creating a ConfigMap “kubelet-config-1.20” in namespace kube-system with the configuration for the kubelets in the cluster  
[upload-certs] Skipping phase. Please see --upload-certs  
[mark-control-plane] Marking the node rurhelena1920 as control-plane by adding the labels “[node-role.kubernetes.io/master=](http://node-role.kubernetes.io/master=)’’” and “[node-role.kubernetes.io/control-plane=](http://node-role.kubernetes.io/control-plane=)’’ (deprecated)”  
[mark-control-plane] Marking the node rurhelena1920 as control-plane by adding the taints [[node-role.kubernetes.io/master:NoSchedule](http://node-role.kubernetes.io/master:NoSchedule)]  
[bootstrap-token] Using token: r1cctv.zgkk2aore4luh7wo  
[bootstrap-token] Configuring bootstrap tokens, cluster-info ConfigMap, RBAC Roles  
[bootstrap-token] configured RBAC rules to allow Node Bootstrap tokens to get nodes  
[bootstrap-token] configured RBAC rules to allow Node Bootstrap tokens to post CSRs in order for nodes to get long term certificate credentials  
[bootstrap-token] configured RBAC rules to allow the csrapprover controller automatically approve CSRs from a Node Bootstrap Token  
[bootstrap-token] configured RBAC rules to allow certificate rotation for all node client certificates in the cluster  
[bootstrap-token] Creating the “cluster-info” ConfigMap in the “kube-public” namespace  
[kubelet-finalize] Updating “/etc/kubernetes/kubelet.conf” to point to a rotatable kubelet client certificate and key  
[addons] Applied essential addon: CoreDNS  
[addons] Applied essential addon: kube-proxy

Your Kubernetes control-plane has initialized successfully!

To start using your cluster, you need to run the following as a regular user:

mkdir -p $HOME/.kube  
sudo cp -i /etc/kubernetes/admin.conf HOME/.kube/config sudo chown (id -u):$(id -g) $HOME/.kube/config

Alternatively, if you are the root user, you can run:

export KUBECONFIG=/etc/kubernetes/admin.conf

You should now deploy a pod network to the cluster.  
Run “kubectl apply -f [podnetwork].yaml” with one of the options listed at:  
[Installing Addons | Kubernetes](https://kubernetes.io/docs/concepts/cluster-administration/addons/)

Then you can join any number of worker nodes by running the following on each as root:

---

<div class="post-metadata">

**Author:** ![mrbobbytables](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/mrbobbytables/32/7_2.png) [@mrbobbytables](https://discuss.kubernetes.io/u/mrbobbytables)\
**Post date:** [December 17, 2020, 1:36pm UTC](https://discuss.kubernetes.io/t/the-connection-to-the-server-localhost-8080-was-refused-did-you-specify-the-right-host-or-port/1464/21 "2020-12-17T13:36:15Z")

</div>

> [@devasim](#):
>
> HOME/.kube/config -kubectl apply -f [[https://cloud.weave.works/k8s/net?k8s-version=](https://cloud.weave.works/k8s/net?k8s-version=)(kubectl version | base64 | tr -d ‘\n’)]([https://cloud.weave.works/k8s/net?k8s-version=$(kubectl%20version%20|%20base64%20|%20tr%20-d%20’\n’)](https://cloud.weave.works/k8s/net?k8s-version=%24(kubectl%20version%20%7C%20base64%20%7C%20tr%20-d%20'%5Cn')))

Mostly as a comment to folk - that also installs weave-net and should not just be copied/pasted

[Next page](https://discuss.kubernetes.io/t/the-connection-to-the-server-localhost-8080-was-refused-did-you-specify-the-right-host-or-port/1464.md?page=2)
