helm-eks-action icon indicating copy to clipboard operation
helm-eks-action copied to clipboard

Kubernetes cluster unreachable

Open jcputter opened this issue 3 years ago • 4 comments

Error: Kubernetes cluster unreachable: Get "http://localhost:8080/version": dial tcp 127.0.0.1:8080: connect: connection refused

I'm doing the following to pass kubeconfig

      - name: Set Kube Config
        run: |
          aws eks update-kubeconfig --name ${{ env.CLUSTER_NAME }} --region ${{ env.AWS_REGION }}
          echo 'KUBE_CONFIG_DATA<<EOF' >> $GITHUB_ENV
          echo $(cat ~/.kube/config | base64) >> $GITHUB_ENV
          echo $(cat ~/.kube/config)
          echo 'EOF' >> $GITHUB_ENV
echo $(cat ~/.kube/config)

confirms the correct details

     - name: Deploy DB
        uses: koslib/[email protected]
        env:
          KUBE_CONFIG_DATA: ${{ env.KUBE_CONFIG_DATA }}
        with:
          command: "helm upgrade --install db --namespace=${{ needs.build.outputs.branch }} --create-namespace ./dbs/mariadb --set tag=${{ needs.build.outputs.branch }} --wait"

jcputter avatar Oct 21 '22 13:10 jcputter

Hello @jcputter, can you post the snippet which shows how this action is used and the env keys/values provided?

koslib avatar Oct 21 '22 13:10 koslib

sure, i updated the original post

jcputter avatar Oct 21 '22 14:10 jcputter

@jcputter I have almost identical setups and it works for me. Can I propose two ideas to try out?

  1. Stick to the same setup however pin the action's version to v1.25.2
  2. Try out the experimental branch (instead of a version tag) to confirm it's not any dependency version issues

Also can you somehow confirm the correct value ends up in the github env?

koslib avatar Oct 22 '22 14:10 koslib

Confirming that fixing version to v1.25.2 solves the issue for time being.

smagurauskas avatar Nov 03 '22 15:11 smagurauskas