koslib / helm-eks-action

The simplest Github Action for executing Helm commands on EKS - cluster authentication included
MIT License
62 stars 61 forks source link

Kubernetes cluster unreachable: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1alpha1" #62

Open kalinowski5 opened 1 year ago

kalinowski5 commented 1 year ago

Hi!

I'm getting the following error: Kubernetes cluster unreachable: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1alpha1"

for the following action:

      - name: Deploy to test cluster
        if: github.event_name == 'push' && github.ref == 'refs/heads/master'
        uses: koslib/helm-eks-action@master
        env:
          KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_TEST }}
        with:
          command: helm upgrade --atomic --install --values "operations/kubernetes/acme-service/configuration/test/environment-values.yaml" --namespace "acme-service-test" --set "nutrition.version=$REVISION_TAG" --wait --timeout 600s acme-service-test ./operations/kubernetes/acme-service

Is there anything that I could change/improve?

I tried to pin version of koslib/helm-eks-action to v1.25.2 and v1.22.0, but this didn't help.

koslib commented 1 year ago

Hi!

This could be related with your kube config file actually.

I'd recommend these steps:

  1. Take a backup of your existing kube config files
  2. Generate your kubeconfig file again, eg. aws eks update-kubeconfig --name <cluster> for EKS clusters
  3. Generate the new base64 version of it cat ~/.kube/config | base64 and upload it as a secret again

Let me know if this worked.

roy-vitrainer commented 1 year ago

Using version 1.25.2 solves the issue for me. Doesn't seem like a kubeconfig issue

koslib commented 1 year ago

@roy-vitrainer could be two different issues - let's see how does that work out for @kalinowski5