Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Running aws kubernetes deploy --dry-run seems to still create the kubernetes objects

As part of the pipeline I want to check the kubernetes deployment scripts for syntax errors. I am adding the --dry-run=client (or just --dry-run) to the deploy command. But that seems to be ignored and the script gets executed as it were called without --dry-run. 

The pipeline is defined as below:

  KUBECTL_ARGS: "--dry-run=client"                

 How can I achieve that behavior?

1 answer

0 votes

Hi @Brad Vrabete ,

Thank you for your question!

The pipe atlassian/aws-eks-kubectl-run:1.4.1 based on kubectl v1.17.

According to the kubectl v1.17 documentation apply command supports the next flags only:

If true, only print the object that would be sent, without sending it.

--dry-run cannot accurately output the result of merging the local manifest and the server-side data.

Use --server-dry-run to get the merged result instead.

so, recommended way is "--server-dry-run".

Also, we are investigating bump version of the kubectl.

Oleksandr Kyrdan

Hi @Oleksandr Kyrdan,

Thanks for the answer. The strange thig is that it works if I put all the parameters in the KUBECTL_COMMAND parameter and remove the rest; that's why I thought there must be something in the pipe that prevents it from running. I di not try --server-dry-run.

Are you filtering the parameters passed to the pipe? That would not be a good idea as it is hard to know what went wrong (hence my question); I would rather get the error message from kubectl and let people handle that. 

In any case I'll try with  --server-dry-run.



Like Oleksandr Kyrdan likes this

@Brad Vrabete

Yep, good question! It shouldn't filter or modify passed params.

We are investigating this case and notify you.


Thank you!
Oleksandr Kyrdan

Like Brad Vrabete likes this

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

129 views 2 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you