Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,554,402
Community Members
 
Community Events
184
Community Groups

issue with aws-eks-kubectl-run:2.2.0

Emmanuel Cohen-Laroque
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Mar 24, 2023

When deploying on EKS, I get the following error (see bold line below)

Here is the related pipeline script

script:
- pipe: atlassian/aws-eks-kubectl-run:2.2.0
variables:
AWS_ACCESS_KEY_ID: ${REHEARSAL_AWS_KEY}
AWS_SECRET_ACCESS_KEY: ${REHEARSAL_AWS_SECRET}
AWS_DEFAULT_REGION: "eu-west-3"
CLUSTER_NAME: "XXXXXXXXXXX"
KUBECTL_COMMAND: "apply --force=true -f"
RESOURCE_PATH: "k8s/${BITBUCKET_REPO_SLUG}-staging.yaml"
DEBUG: "true"

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:
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.

1 answer

0 votes
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 24, 2023

@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.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events