kubexit | Command supervisor for coordinated Kubernetes pod container | Continuous Deployment library
kandi X-RAY | kubexit Summary
kandi X-RAY | kubexit Summary
Command supervisor for coordinated Kubernetes pod container termination.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of kubexit
kubexit Key Features
kubexit Examples and Code Snippets
Community Discussions
Trending Discussions on kubexit
QUESTION
I am trying to run a pod with 2 containers. Main container executes a docker java image which runs the cron job and the other sidecar(logstash) container reads the log and ship it to the Kibana server. As main container completes once the cron job is finished but sidecar container keeps running as it doesn't gracefully shutdown. I tried https://github.com/karlkfi/kubexit and preStop container lifecycle hook but didn't work. Now, I want to try to stop sidecar container using dockerfile. Docker ENTRYPOINT exec java image jar and once java process is finished then I wanted to create / touch a file inside the main container which my other sidecar container looks for that touched file.
This is my current dockerfile
...ANSWER
Answered 2021-Mar-21 at 08:55You can wait for the process to finish by the process PID. The bash
interpreter has a build in command called wait
where if called with a child PID as argument, it will wait until the child had finished.
So you can create the following entrypoint.sh and add it to your java container.
entrypoint.sh
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install kubexit
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page