Why do you use 2 different pods? Would be much simpler with a single one.

Vincent


Le mar. 18 sept. 2018 à 23:22, Tristan FAURE <faure.tris...@gmail.com> a
écrit :

> thank you for your answer, You were right about the plugin I used (
> ttps://github.com/jenkinsci/kubernetes-plugin/blob/master/README.md
> <https://github.com/jenkinsci/kubernetes-plugin/blob/master/README.md>),
> sorry to not mention that
>
> I will test the kubernetes cli plugin, but I think I will see the option
> with multi container in a pod because I would prefer my CI users don't use
> kubectl (it is already a problem for them to write pod yaml 😐)
>
> Le mar. 18 sept. 2018 à 22:25, Jonathan Rogers <jonathanrrog...@gmail.com>
> a écrit :
>
>> On 9/18/18 9:12 AM, Tristan FAURE wrote:
>> > Hello all my previous message with edit :
>> > Thank you to both of you for your answers. I was thinking about creating
>> > services but my db is created then deleted during the build I was not
>> > sure it was a good practice (and if it is possible) to create
>> > dynamically (and delete then) a service directly from the jenkinsfile
>> yaml.
>> >
>> > I will try
>> > *EDIT : I did not find how to declare the service in the yaml in my
>> > jenkinsfile (syntax error). All the containers in one pod works but I
>> > have resource limitations and I would prefer having them separated*
>>
>> I don't think you've said so, but I assume you're using the Jenkins
>> plugin called simply "kubernetes", which is documented at:
>>
>> https://github.com/jenkinsci/kubernetes-plugin/blob/master/README.md
>>
>> AFAICT, that plugin has no built-in way to create Kubernetes service
>> objects. This is why I recommended using kubectl, which allows to
>> create, delete and query any Kubernetes object. You will need to make
>> sure the Docker container image contains a kubectl binary of a version
>> appropriate for your Kubernetes cluster. You will also need to make sure
>> that kubectl can authenticate itself. I haven't tried it, but the
>> "Kubernetes CLI Plugin" may be a good option:
>>
>> https://wiki.jenkins.io/display/JENKINS/Kubernetes+CLI+Plugin
>>
>> --
>> Jonathan Rogers
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Jenkins Users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/jenkinsci-users/6nYxOrwZ5LQ/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to
>> jenkinsci-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jenkinsci-users/e19f7df4-8fee-ee18-4d50-591ecb4ee180%40gmail.com
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/CA%2BtQ8YMO6r3RSDtkmMhR%2BOyvXNJaima-qqgtvBcDGxVezN4iwA%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/CA%2BtQ8YMO6r3RSDtkmMhR%2BOyvXNJaima-qqgtvBcDGxVezN4iwA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAH-zGChQ%2B%2B5Ogf2NePj1EUKnZaVHmpAJkfXs8Dx6N3%2BvaYPn8A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to