From f081886b75718de207b371e1f43be0e117117c9c Mon Sep 17 00:00:00 2001 From: Jordan Liggitt Date: Thu, 29 Apr 2021 11:34:30 -0400 Subject: [PATCH] Update eviction example to use policy/v1 --- .../administer-cluster/safely-drain-node.md | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/content/en/docs/tasks/administer-cluster/safely-drain-node.md b/content/en/docs/tasks/administer-cluster/safely-drain-node.md index 0fc0a97ffc..68a9b10a86 100644 --- a/content/en/docs/tasks/administer-cluster/safely-drain-node.md +++ b/content/en/docs/tasks/administer-cluster/safely-drain-node.md @@ -109,6 +109,28 @@ Pod can be thought of as a kind of policy-controlled DELETE operation on the Pod itself. To attempt an eviction (more precisely: to attempt to *create* an Eviction), you POST an attempted operation. Here's an example: +{{< tabs name="Eviction_example" >}} +{{% tab name="policy/v1" %}} +{{< note >}} +`policy/v1` Eviction is available in v1.22+. Use `policy/v1beta1` with prior releases. +{{< /note >}} + +```json +{ + "apiVersion": "policy/v1", + "kind": "Eviction", + "metadata": { + "name": "quux", + "namespace": "default" + } +} +``` +{{% /tab %}} +{{% tab name="policy/v1beta1" %}} +{{< note >}} +Deprecated in v1.22 in favor of `policy/v1` +{{< /note >}} + ```json { "apiVersion": "policy/v1beta1", @@ -119,6 +141,8 @@ itself. To attempt an eviction (more precisely: to attempt to } } ``` +{{% /tab %}} +{{< /tabs >}} You can attempt an eviction using `curl`: