Kubernetes on Docker for Windows: No connection could be made because the target machine actively refused it.

0 votes

I’m using the edge version of docker for windows and I have also enabled kubernetes.
On my other system kubectl context was created automatically, but on this new machine it was not.

> kubectl config get-contexts
CURRENT   NAME      CLUSTER   AUTHINFO   NAMESPACE
> kubectl version
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.3", GitCommit:"2bba0127d85d5a46ab4b778548be28623b32d0b0", GitTreeState:"clean", BuildDate:"2018-05-21T09:17:39Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"windows/amd64"}
Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.

Can I make Docker for Windows create the context?
Or can I set it up manually?

Nov 23, 2018 in DevOps & Agile by Tyrion anex
• 8,270 points
2,234 views

1 answer to this question.

+1 vote
The issue is with docker for windows when the HOMEDRIVE is set

If you set the $KUBECONFIG environment variable to C:\Users\<my_username>\.kube\config

This should work for you. Make sure you expand the home variable accordingly.
answered Nov 23, 2018 by Tyrion anex
• 8,270 points
hello,I have not the 'my_username' floder.what shoud i can do?
You will have a user folder. The name will not be named 'my_username'. It will your username. Replace my_username with the username on your laptop.

Related Questions In DevOps & Agile

0 votes
1 answer

Kubernetes on Docker for Windows Error

This issue is with docker for windows ...READ MORE

answered Nov 14, 2018 in DevOps & Agile by Tyrion anex
• 8,270 points
100 views
0 votes
1 answer
0 votes
2 answers

How to customize the RAM allocation on Docker for Windows?

Try this: docker update --cpu-shares 5120 -m 3000M ...READ MORE

answered Dec 6, 2018 in DevOps & Agile by Maverick
• 10,040 points
88 views
0 votes
1 answer
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 56,520 points
153 views