How I can use pipeline just to run the kubectl kustomize command to change the repo file

Yogesh August 25, 2022

The use case is to run the pipeline, use kubectl kustomize command to create a K8s deployment file and push the changes back to repo.

I looked into the different existing pipeline like kubectl-run and aws-eks-kubectl-run but those required the k8s cluster should be defined/running and not working just to create a deployment file using kustomize.

May be I don't know how to use these existing pipeline for implementing my use case, if so please guide us or please suggest some alternative solution for the use case

1 answer

0 votes
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 26, 2022

@Yogesh . Thanks for your question.

There is no pipe to cover your case. You can try something like this:

Create and use your own docker image with kubectl command

Then run in the pipelines configuration yml what commands you need:

image:
name: <your docker image with kubectl>


test: &test
step:
name: test
script:
- kubectl apply ...<what you need>

 Alternative way is to use some default image and install kubectl in pipeline:

image:
name: atlassian/default-image:3


test: &test
step:
name: test
script:
- <install kubectl via guide above>
- kubectl apply ...<what you need>

 Regards, Igor

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events