What are the container hooks available in kubernetes

0 votes
How many types of container lifecycle hooks are supported in kubernetes? could you explain them?
Jul 15, 2019 in Kubernetes by Sam
• 6,260 points
2,190 views

1 answer to this question.

0 votes

The hooks enable Containers to be aware of events in their management lifecycle and run code implemented in a handler when the corresponding lifecycle hook is executed.

There are two hooks that are exposed to Containers:

PostStart

This hook executes immediately after a container is created.

However, there is no guarantee that the hook will execute before the container ENTRYPOINT. 

No parameters are passed to the handler. 

PreStop

This hook is called immediately before a container is terminated. 

It is blocking, meaning it is synchronous, so it must complete before the call to delete the container can be sent. 

No parameters are passed to the handler.

For further understanding of these you could have a look: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/

answered Jul 15, 2019 by Sirajul
• 59,230 points

Related Questions In Kubernetes

0 votes
1 answer
0 votes
1 answer

What are selector based selectors in Kubernetes?

This type of selector allows filtering keys ...READ MORE

answered Apr 17, 2019 in Kubernetes by Kim
1,462 views
0 votes
1 answer

What is the difference between config map and secret in kubernetes?

Config maps ideally stores application configuration in ...READ MORE

answered Jul 17, 2019 in Kubernetes by Sirajul
• 59,230 points
3,729 views
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17, 2019 in Others by anonymous
15,477 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,036 views
0 votes
1 answer

Kubernetes: What are the types of multi-container pod patterns?

Here are the different types of multi-container ...READ MORE

answered Jul 17, 2019 in Kubernetes by Sirajul
• 59,230 points
2,372 views
0 votes
1 answer

What all components is the Master server in Kubernetes made up of?

Kubernetes is a combination of multiple parts ...READ MORE

answered Jul 11, 2019 in Kubernetes by Sirajul
• 59,230 points
1,397 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP