devspace-sh / devspace

DevSpace - The Fastest Developer Tool for Kubernetes ⚡ Automate your deployment workflow with DevSpace and develop software directly inside Kubernetes.
https://devspace.sh
Apache License 2.0
4.3k stars 361 forks source link

The server has asked for the client to provide credentials #2683

Open afreyermuth98 opened 1 year ago

afreyermuth98 commented 1 year ago

What happened? When I do a devspace deploy I got the follow error :

error: You must be logged in to the server (the server has asked for the client to provide credentials)

I tried to deploy my charts using helm AND kubectl and I get the same error even if I have no problem with another equivalent project (almost a copy paste)

What did you expect to happen instead? This is my second devspace project so I expect to get the same behaviour which is just working and deploying my app.

How can we reproduce the bug? (as minimally and precisely as possible)

My devspace.yaml:

version: v2beta1
name: docker-compose

localRegistry:
  enabled: false

deployments:
  app:
    kubectl:
      manifests:
        - .devspace/deployment.yaml

my .devspace/deployment.yaml :

apiVersion: apps/v1
kind: Deployment
metadata:
  name: ubuntu
spec:
  selector:
    matchLabels:
      app: ubuntu
  replicas: 1
  template:
    metadata:
      labels:
        app: ubuntu
    spec:
      containers:
      - name: ubuntu
        image: ubuntu
        imagePullPolicy: Always

Local Environment:

Anything else we need to know?

FabianKramm commented 1 year ago

@afreyermuth98 thanks for the issue! Looks like you are not authenticated to the kubernetes api server, does something like kubectl get pods work?

afreyermuth98 commented 1 year ago

@FabianKramm Yes of course, I can reproduce the exact kubectl / helm command and it deploys without issue. Moreover on a parallel devspace project everything works perfectly :/

FabianKramm commented 1 year ago

@afreyermuth98 what if you change the directory from .devspace to something else?

afreyermuth98 commented 1 year ago

@FabianKramm What do you mean ? Inside my .devspace folder I only have a cache.yml file