> ## Content Index
> Fetch the complete content index at: https://scriptcrunch.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# [Solved] couldn't get current server API group list: Get "http://localhost:8080/api?timeout connect: connection refused
- URL: https://scriptcrunch.com/couldnt-get-current-server-api/
- Published: 2024-02-07T06:53:04.000Z
- Updated: 2026-06-23T08:55:56.000Z
- Author: Aswin Vijayan
- Tags: Kubernetes, #Migrated-1758801465347, #wp, #wp-post, #Import 2025-09-25 11:57

**Issue**: When trying to access the [kubernetes cluster](https://scriptcrunch.com/install-kubernetes/) using kubectl you might get the couldn't get current server API - connection refuse error.

Here is the full error.

```
E0202 10:40:56.460499    6352 memcache.go:265] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused
```

This error could be due to four issues. All the issues and its solutions are explained below.

## Issue 1: User doesnt have the Kubeconfig file

This error primarily happens due to Kubeconfig file not present in the users **`$HOME/.kube/config`** location.

Kubectl will try to access the config file for this location.

For example, if the kubeconfig file is added to ubuntu user home and if you try to access kubectl from the root user, you will get the error.

So ensure the kubeconfig file is present in the users home directory.

## Issue 2: Unavailable Cluster

If you have the Kubeconfig file under users folder and still facing connection refused error, it could be due to unavailable cluster.

Ensure you have the cluster up and running.

Also, check if you have set the current context to the correct cluster.

## Issue 3: Unreachable API Server

If you are trying to reach a [Kubernetes](https://scriptcrunch.com/tag/kubernetes/) cluster deployed in a private network, you will get the connection refused error.

For example, you might have deployed a Kubernetes cluster with a private IP in cloud environment. If you try to access that cluster from your workstation, you cannot connect to it.

## Issue 4: Firewall Issue

If you have a Kuberntes cluster running remotely, ensure the firewall rules accept connection on port 6443 from the machine you are trying to access the API server.

If you have the cluster on cloud, check the firewall rules for control plane node for incomming connections on port 6443.