add en pages

This commit is contained in:
Karen Bradshaw
2020-05-30 15:10:23 -04:00
parent 1502e0281d
commit ecc27bbbe7
347 changed files with 2900 additions and 2537 deletions
@@ -1,27 +1,28 @@
---
title: Attach Handlers to Container Lifecycle Events
content_template: templates/task
content_type: task
weight: 140
---
{{% capture overview %}}
<!-- overview -->
This page shows how to attach handlers to Container lifecycle events. Kubernetes supports
the postStart and preStop events. Kubernetes sends the postStart event immediately
after a Container is started, and it sends the preStop event immediately before the
Container is terminated.
{{% /capture %}}
{{% capture prerequisites %}}
## {{% heading "prerequisites" %}}
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
{{% /capture %}}
{{% capture steps %}}
<!-- steps -->
## Define postStart and preStop handlers
@@ -56,11 +57,11 @@ The output shows the text written by the postStart handler:
Hello from the postStart handler
{{% /capture %}}
{{% capture discussion %}}
<!-- discussion -->
## Discussion
@@ -82,10 +83,11 @@ This means that the preStop hook is not invoked when the Pod is *completed*.
This limitation is tracked in [issue #55087](https://github.com/kubernetes/kubernetes/issues/55807).
{{< /note >}}
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
* Learn more about [Container lifecycle hooks](/docs/concepts/containers/container-lifecycle-hooks/).
* Learn more about the [lifecycle of a Pod](/docs/concepts/workloads/pods/pod-lifecycle/).
@@ -97,6 +99,6 @@ This limitation is tracked in [issue #55087](https://github.com/kubernetes/kuber
* [Container](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#container-v1-core)
* See `terminationGracePeriodSeconds` in [PodSpec](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podspec-v1-core)
{{% /capture %}}