Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it
Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it
Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it
Re: Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it
I think you might missed out to configure the cluster, for that you need to run the below command in your command prompt.
```
az aks get-credentials --resource-group myResourceGroup --name myAKSCluster
```
The above CLI command creates .config file with complete cluster and nodes details in your local machine.
After that you run `kubectl get nodes` command in your command prompt, then you can get the list of nodes inside the cluster like in the below image.
[](https://i.sstatic.net/PyloI.png)
For reference follow this [Deploy an Azure Kubernetes Service (AKS) cluster](https://learn.microsoft.com/en-us/azure/aks/kubernetes-walkthrough).
```
az aks get-credentials --resource-group myResourceGroup --name myAKSCluster
```
The above CLI command creates .config file with complete cluster and nodes details in your local machine.
After that you run `kubectl get nodes` command in your command prompt, then you can get the list of nodes inside the cluster like in the below image.
[](https://i.sstatic.net/PyloI.png)
For reference follow this [Deploy an Azure Kubernetes Service (AKS) cluster](https://learn.microsoft.com/en-us/azure/aks/kubernetes-walkthrough).