Kubernetes cluster unreachable
jcputter opened this issue · 4 comments
jcputter commented
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/helm-eks-action@v1.25.4
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"
koslib commented
Hello @jcputter, can you post the snippet which shows how this action is used and the env keys/values provided?
jcputter commented
sure, i updated the original post
koslib commented
@jcputter I have almost identical setups and it works for me. Can I propose two ideas to try out?
- Stick to the same setup however pin the action's version to
v1.25.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?
smagurauskas commented
Confirming that fixing version to v1.25.2
solves the issue for time being.