Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 342 Vote(s) - 3.48 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it

#11
Following @ilya-chernomordik,
I've added my config path to the System Variable by doing

setx KUBECONFIG "D:\Minikube\Minikube\.minikube\config"

I have changed the default Location from C: Drive to D: Drive as i have less space in C.

Now the problem is fixed.

edit: after 5 mins, the api server again stopped. It's been more than 5-6 hours i'm trying to solve this issue. I'm not sure why this problem is happening, even after adding the coreect path.
Reply

#12
Azure self-hosted agent doesn't have the permission to access Kubernates cluster:

```
Remove Azure self-hosted agent - .\config.cmd Remove
configure again ( .\config.cmd) with a user have permission to access Kubernates cluster
```
Reply

#13
Essentially this problem occurs if your minikube or kind isn't configured. Just try to restart your minikube or kind. If that doesn't solve your problem then try to restart your hypervisor which minikube uses.
```
minikube start
```

This command solved my issue.
Reply

#14
If you're facing this error on windows, its possible that your docker instance is not running.

These are the steps I followed to replicate the above error;
1. Stopped docker and then tried to start-up an nginx-deployment. Doing this caused the mentioned error above to happen.

[![enter image description here][1]][1]

**How did I solve it?**
1. Check if minikube is running in my case this was not running
[![enter image description here][2]][2]

2. Start minikube
[![enter image description here][3]][3]
3. Retry applying your configuration above. In my case see the screenshot below

[![enter image description here][4]][4]

4. When you see that your deployment has been created, then all should be fine.

[1]:

[2]:

[3]:

[4]:
Reply

#15
In my situation, I'm in windows with docker desktop in a simple scenario just for studies, but the case is:

In the docker version in 20.10 or above, it come with kubernetes installed. Then it doesn't necessary installed a cluster adm like minikube. Then, when it just need to enable kubernetes in Docker Desktop configuration. Like:

Go to Docker Desktop: **settings** > **kubernetes** > check the box inside section **Enable kubernetes** and then click in **Restart Kubernetes Cluster**

When we do this, the docker provide all needed to works Kubernetes properly.

Referenced by: [Blog][1]


[1]:

[To see links please register here]

Reply

#16
I am on windows 10, and for me I did not enable kubernetes on Docker Desktop.

As you can see here, there are no contexts available.

[![docker-desktop kubernetes context][1]][1]

So go to settings of docker desktop and enable it as follows.

[![docker-desktop enable kubernetes][2]][2]

Now run a command as follows.

kubectl config get-contexts

Ensure you see something like this.

[![kubectl contexts on command line][3]][3]

Also you can also try listing the nodes as follows.

kubectl get nodes

[![enter image description here][4]][4]


[1]:

[2]:

[3]:

[4]:
Reply

#17
On Rancher Desktop, make sure context is correctly choosen

[![enter image description here][1]][1]


[1]:
Reply

#18
I was facing the same issue in windows. <br>
After changing the Kubernetes running from **minikube** to **docker-desktop**, my problem was resolved.
[![enter image description here][1]][1]


[1]:


ps: if you haven't enabled kubernetes in docker-desktop, please enable it first.
Reply

#19
I faced the same issue after enabling kubenetes from the Docker Desktop running on Windows 10 Professional. I followed the instruction here

[To see links please register here]

and it solved my issue. In summary,

1. I opened powershell as admin and ran [Environment]::SetEnvironmentVariable("KUBECONFIG", $HOME + "\.kube\config", [EnvironmentVariableTarget]::Machine).
2. Next I went to Docker Desktop settings and reset kubenetes. That solved it. [![enter image description here][1]][1]


[1]:
Reply

#20
For wsl on Windows.

If your k8s cluster is running on wsl and you are getting this error from your ide on windows or windows command line, copy over your kubeconfig from wsl to your .kube folder inside C:/Users/<your_username>

and recheck.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through