aws-eks-orb icon indicating copy to clipboard operation
aws-eks-orb copied to clipboard

kubectl cannot install versions after 1.28

Open replu opened this issue 8 months ago • 1 comments

Orb version

2.2.0

What happened

When using the aws-eks/update-kubeconfig-with-authenticator command with install-kubectl: true and specifying kubectl-version: v1.30.8, the command attempts to download kubectl, but the installed file turns out to be an error page in XML format instead of a binary. This causes subsequent steps using kubectl to fail.

Example job definition:

    steps:
      - checkout
      - aws-eks/update-kubeconfig-with-authenticator:
          cluster-name: ${CLUSTER_NAME}
          install-kubectl: true
          kubectl-version: v1.30.8
          verbose: true
      - run:
          name: if job exists, delete it
          command: |
            set +e
            kubectl get job ${RELEASE_NAME}
            JOB_EXISTS=$?
            set -e
            if [ ${JOB_EXISTS} -eq 0 ]; then
              echo "Deleting job ${RELEASE_NAME}."
              kubectl delete job ${RELEASE_NAME}
            else
              echo "The job named ${RELEASE_NAME} was not found."
            fi

Output messages

/usr/local/bin/kubectl: line 1: syntax error near unexpected token `<'
/usr/local/bin/kubectl: line 1: `<?xml version='1.0' encoding='UTF-8'?><Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Details>No such object: kubernetes-release/release/v1.30.8/bin/linux/amd64/kubectl</Details></Error>'
The job named xxxx was not found.

Possibly caused by an outdated version of the kubernetes-orb used internally: https://github.com/CircleCI-Public/kubernetes-orb/issues/74

Expected behavior

kubectl is installed successfully.

replu avatar Apr 09 '25 06:04 replu

I have released a new major version of the orb updating all the dependencies here, and I think that could help with your problem as this orb is now pointing to the fixed version of kubernetes orb.

marboledacci avatar Jun 17 '25 18:06 marboledacci