You want a template expander before you get to kubectl.  Otherwise, the
thing that is running isn't reflected by any versionable artifact.

Because templating is a high-opinion space, we do not (currently) have one
that is built-in.

On Dec 7, 2017 10:12 AM, "Henry Hottelet" <hotte...@gmail.com> wrote:

>
> Is there not a way to pass arguments from command line to the Pod
> specification?  There should be, because this is not the first time that a
> Docker argument is needed when calling a Pod instance, whether dynamic or
> staticly defined.
>
> I could have Pod1.yaml, Pod2.yaml, and have an Ipaddress, and Port number
> for reach separate Pod that is defined.
>
>
>
> On Thursday, December 7, 2017 at 11:03:28 AM UTC-5, Tim Hockin wrote:
>>
>> Kubectl is not a templating system, which is what you are asking for.
>> Create/Apply are declarative plumbing, suitable to things you would check
>> in to source control.  There are porcelain commands, eg. kubectl run, which
>> are closer to docker run, but less suitable to source control.
>>
>> On Dec 7, 2017 9:56 AM, "Henry Hottelet" <hott...@gmail.com> wrote:
>>
>>>
>>> A problem:
>>>
>>> Docker arguments will pass from command line:
>>>
>>> docker run -it -p 8080:8080 joethecoder2/spring-boot-web 
>>> -Dcassandra_ip=127.0.0.1 -Dcassandra_port=9042
>>>
>>> However, when I do:
>>>
>>> kubectl create -f ./singlePod.yaml
>>>
>>> Kubernetes POD arguments will not pass from singlePod.yaml file:
>>>
>>> apiVersion: v1
>>> kind: Pod
>>> metadata:
>>>   name: spring-boot-web-demo
>>>   labels:
>>>     purpose: demonstrate-spring-boot-web
>>> spec:
>>>   containers:
>>>   - name: spring-boot-web
>>>     image: docker.io/joethecoder2/spring-boot-web
>>>     env: ["name": "-Dcassandra_ip", "value": "127.0.0.1"]
>>>     command: ["java","-jar", "spring-boot-web-0.0.1-SNAPSHOT.jar", 
>>> "-D","cassandra_ip=127.0.0.1", "-D","cassandra_port=9042"]
>>>     args: ["-Dcassandra_ip=127.0.0.1", "-Dcassandra_port=9042"]
>>>   restartPolicy: OnFailure
>>>
>>> Question: How do I correctly specify arguments that will change at
>>> runtime?  I want to add two arguments that change at Kubernetes POD
>>> runtime, because these should be configurable for each POD that is defined.
>>>   Arguments for the POD are:  -Dcassandra_ip=127.0.0.1",
>>> "-Dcassandra_port=9042
>>>
>>> I want the arguments to be accepted just like the Docker command line.
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Kubernetes user discussion and Q&A" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to kubernetes-use...@googlegroups.com.
>>> To post to this group, send email to kubernet...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/kubernetes-users.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Kubernetes user discussion and Q&A" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to kubernetes-users+unsubscr...@googlegroups.com.
> To post to this group, send email to kubernetes-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/kubernetes-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to kubernetes-users+unsubscr...@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to