<p>I have CircleCI setup and running fine normally, it will helps with creating deployment for me. Today I have suddenly had an issue with the step in creating the deployment due to an error related to kubernetes.</p>
<p>I have the config.yml followed the doc from <a href="https://circleci.com/developer/orbs/orb/circleci/kubernetes" rel="nofollow noreferrer">https://circleci.com/developer/orbs/orb/circleci/kubernetes</a></p>
<p>Here is my version of setup in the config file:</p>
<pre><code>version: 2.1

orbs: 
  kube-orb: circleci/kubernetes@1.3.0

commands:
  docker-check:
    steps: 
      - docker/check:
        docker-username: MY_USERNAME
        docker-password: MY_PASS
        registry: $DOCKER_REGISTRY

jobs: 
  create-deployment:
    executor: aws-eks/python3
    parameters: 
      cluster-name:
        description: Name of the EKS cluster
        type: string
    steps:
      - checkout
      # It failed on this step
      - kube-orb/delete-resource:
        now: true
        resource-names: my-frontend-deployment
        resource-types: deployments
        wait: true

</code></pre>
<p>Below is a copy of the error log</p>
<pre><code>#!/bin/bash -eo pipefail
#!/bin/bash
RESOURCE_FILE_PATH=$(eval echo &quot;$PARAM_RESOURCE_FILE_PATH&quot;)
RESOURCE_TYPES=$(eval echo &quot;$PARAM_RESOURCE_TYPES&quot;)
RESOURCE_NAMES=$(eval echo &quot;$PARAM_RESOURCE_NAMES&quot;)
LABEL_SELECTOR=$(eval echo &quot;$PARAM_LABEL_SELECTOR&quot;)
ALL=$(eval echo &quot;$PARAM_ALL&quot;)
CASCADE=$(eval echo &quot;$PARAM_CASCADE&quot;)
FORCE=$(eval echo &quot;$PARAM_FORCE&quot;)
GRACE_PERIOD=$(eval echo &quot;$PARAM_GRACE_PERIOD&quot;)
IGNORE_NOT_FOUND=$(eval echo &quot;$PARAM_IGNORE_NOT_FOUND&quot;)
NOW=$(eval echo &quot;$PARAM_NOW&quot;)
WAIT=$(eval echo &quot;$PARAM_WAIT&quot;)
NAMESPACE=$(eval echo &quot;$PARAM_NAMESPACE&quot;)
DRY_RUN=$(eval echo &quot;$PARAM_DRY_RUN&quot;)
KUSTOMIZE=$(eval echo &quot;$PARAM_KUSTOMIZE&quot;)
if [ -n &quot;${RESOURCE_FILE_PATH}&quot; ]; then
    if [ &quot;${KUSTOMIZE}&quot; == &quot;1&quot; ]; then
    set -- &quot;$@&quot; -k
    else
    set -- &quot;$@&quot; -f
    fi
    set -- &quot;$@&quot; &quot;${RESOURCE_FILE_PATH}&quot;
elif [ -n &quot;${RESOURCE_TYPES}&quot; ]; then
    set -- &quot;$@&quot; &quot;${RESOURCE_TYPES}&quot;
    if [ -n &quot;${RESOURCE_NAMES}&quot; ]; then
    set -- &quot;$@&quot; &quot;${RESOURCE_NAMES}&quot;
    elif [ -n &quot;${LABEL_SELECTOR}&quot; ]; then
    set -- &quot;$@&quot; -l
    set -- &quot;$@&quot; &quot;${LABEL_SELECTOR}&quot;
    fi
fi
if [ &quot;${ALL}&quot; == &quot;true&quot; ]; then
    set -- &quot;$@&quot; --all=true
fi
if [ &quot;${FORCE}&quot; == &quot;true&quot; ]; then
    set -- &quot;$@&quot; --force=true
fi
if [ &quot;${GRACE_PERIOD}&quot; != &quot;-1&quot; ]; then
    set -- &quot;$@&quot; --grace-period=&quot;${GRACE_PERIOD}&quot;
fi
if [ &quot;${IGNORE_NOT_FOUND}&quot; == &quot;true&quot; ]; then
    set -- &quot;$@&quot; --ignore-not-found=true
fi
if [ &quot;${NOW}&quot; == &quot;true&quot; ]; then
    set -- &quot;$@&quot; --now=true
fi
if [ -n &quot;${NAMESPACE}&quot; ]; then
    set -- &quot;$@&quot; --namespace=&quot;${NAMESPACE}&quot;
fi
if [ -n &quot;${DRY_RUN}&quot; ]; then
    set -- &quot;$@&quot; --dry-run=&quot;${DRY_RUN}&quot;
fi
set -- &quot;$@&quot; --wait=&quot;${WAIT}&quot;
set -- &quot;$@&quot; --cascade=&quot;${CASCADE}&quot;
if [ &quot;$SHOW_EKSCTL_COMMAND&quot; == &quot;1&quot; ]; then
    set -x
fi
kubectl delete &quot;$@&quot;
if [ &quot;$SHOW_EKSCTL_COMMAND&quot; == &quot;1&quot; ]; then
    set +x
fi

error: exec plugin: invalid apiVersion &quot;client.authentication.k8s.io/v1alpha1&quot;

Exited with code exit status 1
CircleCI received exit code 1
</code></pre>
<p>Does anyone have idea what is wrong with it? Im not sure whether the issue is happening on Circle CI side or Kubernetes side.</p>

<p>I was facing the exact issue since yesterday morning (16 hours ago). Then taking @Gavy's advice, I simply added this in my <code>config.yml</code>:</p>
<pre class="lang-yaml prettyprint-override"><code>steps:
  - checkout
  # !!! HERE !!!
  - kubernetes/install-kubectl:
      kubectl-version: v1.23.5
  - run:
</code></pre>
<p>And now it works. Hope it helps.</p>
