iRunner
iRunner

Reputation: 1532

Can we pass the argument for Kubectl create command via terminal

I have deployment yaml file where I am setting up one ARG.

args['--country=usa']

It runs perfectly and pod will be up with this argument. But for different country name, I need to change this yaml for argument and then run

kubectl create -f deploy.yml command again and again

Is there any way to pass this arg through create command

I tried kubectl create -f deploy.yml '--country=usa' but it seems like this is not the correct way to pass it

Upvotes: 0

Views: 404

Answers (1)

Daigo
Daigo

Reputation: 1081

Unfortunately, there is no simple way to do that. Here are some related questions.

Using env variable and configmap: How to pass command line argument to kubectl create command

Using Helm: Kubernetes Deployment - Pass arguments

Upvotes: 1

Related Questions