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,368,035
Community Members
 
Community Events
168
Community Groups

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

Yogesh I'm New Here Aug 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

@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

Atlassian Community Events