Azure/k8s-create-secret

Not able to create secret with EKS

onabison opened this issue · 2 comments

Hello,

I have read the document and I believe I am using the manifest correctly. I am using azure/k8s-set-context@v3 to set the context first. It seems to be successful (but I'm not 100% sure). Here is the debug info for that portion:

##[debug]Writing kubeconfig contents to /home/runner/work/_temp/kubeconfig_1674177059730
##[debug]Setting KUBECONFIG environment variable
##[debug]Node Action run completed with exit code 0
##[debug]KUBECONFIG='/home/runner/work/_temp/kubeconfig_1674177059730'
##[debug]Finishing: Set the Kubernetes context

Then I am using azure/k8s-create-secret@v4 and I get a timeout when trying to connect to the EKS URL. I don't have a problem creating the secret the usual way with a manifest.

Here is my GHA code:

        uses: azure/k8s-set-context@v3
        with:
          method: kubeconfig
          kubeconfig: ${{ secrets.KCONFIG }}
          context: 'arn:aws:eks:us-east-1:{my_account_number}:cluster/{my_cluster_name}'
        id: set-context
      - name: Set imagePullSecret
        uses: azure/k8s-create-secret@v4
        with:
          namespace: '{my_namespace}'
          secret-name: 'ghcr'
          container-registry-url: 'ghcr.io/{my_org_id}'
          container-registry-username: ${{ github.actor }}
          container-registry-password: ${{ secrets.PAT }}
        id: create-secret

Here is the DEBUG output:

Warning: Failed to delete secret with statusCode: undefined
Deleting secret:
undefined
Creating secret
{"errno":-110,"code":"ETIMEDOUT","syscall":"connect","address":"10.XX.31.115","port":443}
Error: connect ETIMEDOUT 10.XX.31.115:443
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: Set imagePullSecret

Can you please help me understand if/what I'm doing wrong?

Thanks in advance!

hi @onabison , when you say you "don't have a problem creating the secret the usual way with a manifest" do you mean kubectl apply from a github action running it as a script instead of using the k8s-create-secret action?
since there is a timeout in the network call, it could be an issue with the KUBECONFIG causing the calls to fail

This issue is idle because it has been open for 14 days with no activity.