Unauthorized error when accessing Kubernetes resources in kind cluster

Summary

The user is facing an unauthorized error when trying to access certain Kubernetes resources in a kind cluster despite having the correct kubeconfig setup. The error message indicates that the server is requesting client credentials. The user is seeking insights and suggestions for troubleshooting this issue.


Question

Hello Community,

I’m currently experiencing an issue with my Kubernetes cluster set up using kind. My Airbyte installation is running perfectly, but I’m unable to access certain Kubernetes resources, which is causing confusion.

Whenever I attempt to run commands like kubectl cluster-info or kubectl get pods, I receive the following error:

E1002 ... "couldn't get current server API group list: the server has asked for the client to provide credentials"

My kubeconfig seems to be set up correctly, and it includes the necessary client certificates. However, I still get the unauthorized error messages when trying to access the cluster. Here’s a snippet from my current configuration:

apiVersion: v1
clusters:
- cluster:
    insecure-skip-tls-verify: true
    server: <https://127.0.0.1:42229>
  name: kind-airbyte-abctl
contexts:
- context:
    cluster: kind-airbyte-abctl
    user: kind-airbyte-abctl
  name: kind-airbyte-abctl
current-context: kind-airbyte-abctl
kind: Config
preferences: {}
users:
- name: kind-airbyte-abctl
  user:
    client-certificate-data: [DATA OMITTED]
    client-key-data: [DATA OMITTED]

I have verified that the API server is running, and Airbyte is functioning correctly within the cluster, but I can’t figure out why I’m encountering these credential-related errors.

Any insights or suggestions for troubleshooting this issue would be greatly appreciated!

Thank you!



This topic has been created from a Slack thread to give it more visibility.
It will be on Read-Only mode here. Click here if you want
to access the original thread.

Join the conversation on Slack

["unauthorized-error", "kubernetes", "kind-cluster", "kubeconfig", "client-certificates", "troubleshooting"]

Sounds like maybe your kubectl isn’t configured correctly? What does kubectl config current-context say?

Hello! I think you need to pass the correct kubeconfig file using --kubeconfig? I had a similar issue yesterday when trying to check pods with kubectl, but saw this documentation. This is for users who installed via abctl however.

Example command to list pods:
kubectl --kubeconfig ~/.airbyte/abctl/abctl.kubeconfig --namespace airbyte-abctl get pods
https://docs.airbyte.com/deploying-airbyte/troubleshoot-deploy#using-standard-tools-to-interact-with-an-airbyte-instance-that-was-installed-with-abctl|https://docs.airbyte.com/deploying-airbyte/troubleshoot-deploy#using-standard-tools-to-interact-with-an-[…]te-instance-that-was-installed-with-abctl