When deploying on EKS, I get the following error (see bold line below)
Here is the related pipeline script
Status: Downloaded newer image for bitbucketpipelines/aws-eks-kubectl-run:2.2.0
DEBUG: Starting new HTTPS connection (1): bitbucket.org:443
DEBUG: https://bitbucket.org:443 "GET /bitbucketpipelines/official-pipes/raw/master/pipes.prod.json HTTP/1.1" 200 None
INFO: Configuring kubeconfig...
Added new context arn:aws:eks:eu-west-3:xxxxxxxxxxxx to /root/.kube/config
Entries:
context:
cluster: arn:aws:eks:eu-west-3:xxxxxxxxxxxxxx
user: arn:aws:eks:eu-west-3:xxxxxxxxxxxxxxx
name: arn:aws:eks:eu-west-3:xxxxxxxxxxxxxx
name: arn:aws:eks:eu-west-3:xxxxxxxxxxxxxxx
user:
exec:
apiVersion: client.authentication.k8s.io/v1alpha1
args:
- --region
- eu-west-3
- eks
- get-token
- --cluster-name
- xxxxxxxxxxxxxx
command: aws
cluster:
certificate-authority-data: xxxxxxxxxxxxxxx==
name: arn:aws:eks:eu-west-3:xxxxxxxxxxxxxxxxx
INFO: Successfully updated the kube config.
error: the path "--v=2" does not exist
✖ kubectl apply --force=true -f failed.
@Emmanuel Cohen-Laroque hi. Your pipe command was not resolved correctly.
Please, take a look at the pipe README, you should provide apply related arguments under `KUBECTL_APPLY_ARGS`, but since `-f` is used by default, you could omit it. And `--force=true` argument should be passed to `KUBECTL_ARGS`.
So your script should be like this:
script: - pipe: atlassian/aws-eks-kubectl-run:2.2.0 variables: AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION CLUSTER_NAME: 'my-kube-cluster' KUBECTL_COMMAND: 'apply' RESOURCE_PATH: 'k8s/${BITBUCKET_REPO_SLUG}-staging.yaml' KUBECTL_ARGS: - "--force"
Regards, Igor.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.