Skip to content

kubectl cannot install versions after 1.28 #81

@replu

Description

@replu

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:
CircleCI-Public/kubernetes-orb#74

Expected behavior

kubectl is installed successfully.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions