Skip to content

Commit 7d631e4

Browse files
authored
Merge pull request #27810 from liggitt/eviction-v1
Update eviction example to use policy/v1
2 parents af84d42 + f081886 commit 7d631e4

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

content/en/docs/tasks/administer-cluster/safely-drain-node.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,28 @@ Pod can be thought of as a kind of policy-controlled DELETE operation on the Pod
109109
itself. To attempt an eviction (more precisely: to attempt to
110110
*create* an Eviction), you POST an attempted operation. Here's an example:
111111

112+
{{< tabs name="Eviction_example" >}}
113+
{{% tab name="policy/v1" %}}
114+
{{< note >}}
115+
`policy/v1` Eviction is available in v1.22+. Use `policy/v1beta1` with prior releases.
116+
{{< /note >}}
117+
118+
```json
119+
{
120+
"apiVersion": "policy/v1",
121+
"kind": "Eviction",
122+
"metadata": {
123+
"name": "quux",
124+
"namespace": "default"
125+
}
126+
}
127+
```
128+
{{% /tab %}}
129+
{{% tab name="policy/v1beta1" %}}
130+
{{< note >}}
131+
Deprecated in v1.22 in favor of `policy/v1`
132+
{{< /note >}}
133+
112134
```json
113135
{
114136
"apiVersion": "policy/v1beta1",
@@ -119,6 +141,8 @@ itself. To attempt an eviction (more precisely: to attempt to
119141
}
120142
}
121143
```
144+
{{% /tab %}}
145+
{{< /tabs >}}
122146

123147
You can attempt an eviction using `curl`:
124148

0 commit comments

Comments
 (0)