forked from pivotal-cf/docs-pks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
delete-cluster.html.md.erb
58 lines (42 loc) · 2.96 KB
/
delete-cluster.html.md.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
title: Deleting Clusters
owner: PKS
---
<strong><%= modified_date %></strong>
This topic describes how to delete a Kubernetes cluster deployed by <%= vars.product_full %>. Running the `pks delete-cluster` command automatically deletes all cluster objects.
If you are using <%= vars.product_short %> with NSX-T, see [vSphere with NSX-T Cluster Objects](vsphere-nsxt-cluster-objects.html) for a list of vSphere and NSX-T objects that will be deleted as part of the cluster deletion process.
## <a id='delete'></a>Delete Cluster
Follow the steps below to delete a cluster using the PKS CLI.
1. <%= partial 'login-pks-api' %>
1. Run `pks delete-cluster CLUSTER-NAME` to delete a cluster. Replace `CLUSTER-NAME` with the unique name for your cluster.
For example:
<pre class="terminal">$ pks delete-cluster my-cluster</pre>
1. Confirm cluster deletion by entering `y`, or cancel cluster deletion by entering `n`.<br><br>For example:
<pre class="terminal">Are you sure you want to delete cluster my-cluster? (y/n)</pre>
## <a id='verify'></a>Verify Cluster Deletion
Follow the steps below to verify cluster deletion using the PKS CLI.
1. To verify cluster deletion, run `pks cluster CLUSTER-NAME`. Replace `CLUSTER-NAME`
with the unique name for your cluster.<br><br>For example:
<pre class="terminal">$ pks cluster my-cluster
Name: my-cluster
Plan Name: small
UUID: 106aabc7-5ecb-4c54-a800-a32eef57a593
Last Action: DELETE
Last Action State: in progress
Last Action Description: Instance deletion in progress
Kubernetes Master Host: my-cluster.pks.local
Kubernetes Master Port: 8443
Worker Nodes: 3
Kubernetes Master IP(s): 10.196.219.88
Network Profile Name:
</pre>
While <%= vars.product_short %> is deleting the cluster, the value for `Last Action Description` is
`Instance deletion in progress`.
1. Continue running the `pks cluster CLUSTER-NAME` command to track cluster deletion.
The cluster is deleted when the CLI returns `Error: Cluster CLUSTER-NAME not found`.
1. Run `pks clusters`. The cluster you deleted should not appear in the list of <%= vars.product_short %> clusters.
<p class="note"><strong>Note</strong>: If the cluster is not deleted, see <a href="troubleshoot-issues.html#cluster-delete-fail">Cluster Deletion Fails</a> in <em>Troubleshooting</em>.</p>
## <a id='non-interactive'></a>Delete Cluster without Prompt
If you do not want the PKS CLI to prompt you to confirm cluster deletion, use the `--non-interactive` flag.<br><br>For example:
<pre class="terminal">$ pks delete-cluster my-cluster --non-interactive</pre>
<p class="note"><strong>Note</strong>: If you use the <code>--non-interactive</code> flag to delete multiple clusters, delete each cluster one by one. Do not create a script that deletes multiple clusters using the <code>--non-interactive</code> flag. If you do, the BOSH Director may hang and become unusable until you log in to BOSH and cancel each deletion task.</p>