Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it

Am working on Azure Kubernates where we can store Docker Images in Azure. Here am trying to check my kubectl version, then am getting

Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.

For this I followed MSDN:uilding Microservices with AKS and VSTS – Part 2 and MSDOCS:Kubernetes on windows

So, can you please suggest me “How to resolve for this issue?”

like image 622
Mani Avatar asked May 23 '18 14:05

Mani


People also ask

How do I resolve Imagepullbackoff in Kubernetes?

To resolve it, double check the pod specification and ensure that the repository and image are specified correctly. If this still doesn't work, there may be a network issue preventing access to the container registry. Look in the describe pod text file to obtain the hostname of the Kubernetes node.

How do you set current context in kubectl?

What this says is that you can create or modify contexts in your kubeconfig file with the command kubectl config set-context. This command also accepts the name of the context to be changed (or --current if you want to change the current context), as well as --user, --cluster, and --namespace options.


1 Answers

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.

enter image description here For reference follow this Deploy an Azure Kubernetes Service (AKS) cluster.

like image 109
Pradeep Avatar answered Sep 25 '22 20:09

Pradeep