@@ -537,6 +537,110 @@ In Kubernetes we can now see the additional worker nodes and pods can schedule t
537537 dev-cluster1-47ctpuwqwfsi-default-worker-10b73ddb-ljcf5 Ready <none> 67m v1.28.8 10.0.0.19 <none> Flatcar Container Linux by Kinvolk 3815.2.0 (Oklo) 6.1.77-flatcar containerd://1.7.13
538538 dev-cluster1-47ctpuwqwfsi-default-worker-10b73ddb-mbtwp Ready <none> 67m v1.28.8 10.0.0.22 <none> Flatcar Container Linux by Kinvolk 3815.2.0 (Oklo) 6.1.77-flatcar containerd://1.7.13
539539
540+
541+
542+ .. _cluster-deletion :
543+
544+ ****************
545+ Cluster Deletion
546+ ****************
547+
548+ Kubernetes clusters can be deleted when they are no longer needed. There are
549+ some considerations that should be made when performing this operation to avoid
550+ unexpected costs due to certain cloud resources being preserved, or unexpected
551+ deletion of cloud resources which are automatically discarded during the
552+ deletion process.
553+
554+ Deleting a cluster
555+ ==================
556+
557+ Once you are certain a cluster is no longer needed, you may begin the process
558+ of deleting it. Additional cloud resources created by Magnum during the
559+ cluster's lifetime (identifiable by name containing the cluster ID and/or name)
560+ will be automatically discarded when the cluster is scheduled for deletion.
561+ These resources are treated identically as those manually created and can be
562+ consumed or reserved by other manually created resources. Consider checking
563+ that none of Magnum's resources have dependents that were manually created as
564+ they may prevent cluster deletion from progressing:
565+
566+ * Network resources created during cluster creation including networks,
567+ routers, subnets, ports, security groups, etc.
568+
569+ .. code-block :: console
570+
571+ $ openstack network list -c ID -c Name
572+ +--------------------------------------+------------------------------------------------------------------------------------------+
573+ | ID | Name |
574+ +--------------------------------------+------------------------------------------------------------------------------------------+
575+ | 6f63d4fd-d128-469c-b95a-89c2a2eadc51 | k8s-clusterapi-cluster-magnum-2a6aec5bc77990641f88801268231c63-dev-cluster1-32h3pwv26743 |
576+ +--------------------------------------+------------------------------------------------------------------------------------------+
577+
578+ $ openstack router list -c ID -c Name
579+ +--------------------------------------+------------------------------------------------------------------------------------------+
580+ | ID | Name |
581+ +--------------------------------------+------------------------------------------------------------------------------------------+
582+ | 20b8693a-f8fb-4520-882a-d119fe97848c | k8s-clusterapi-cluster-magnum-2a6aec5bc77990641f88801268231c63-dev-cluster1-32h3pwv26743 |
583+ +--------------------------------------+------------------------------------------------------------------------------------------+
584+
585+ * Load balancers from services using the ``LoadBalancer `` type. For example,
586+ from the chosen ingress controller.
587+
588+ .. code-block :: console
589+
590+ $ openstack loadbalancer list -c id -c name -c vip_address
591+ +--------------------------------------+-------------------------------------------------------------------------------+-------------+
592+ | id | name | vip_address |
593+ +--------------------------------------+-------------------------------------------------------------------------------+-------------+
594+ | 53e6eaf7-a9ee-4776-95c4-fd93b5ca672b | k8s-magnum-2a6aec5bc77990641f88801268231c63-dev-cluster1-32h3pwv26743-kubeapi | 10.0.0.221 |
595+ | 19ca8a7e-7895-4a6d-ad8e-3674f4cf8fc6 | kube_service_dev-cluster1-32h3pwv26743_ingress-nginx_ingress-nginx-controller | 10.0.0.125 |
596+ +--------------------------------------+-------------------------------------------------------------------------------+-------------+
597+
598+ * Floating IPs provisioned by Magnum. For example, those associated with the
599+ Kube API and the ingress controller as in the example above.
600+
601+ .. code-block :: console
602+
603+ $ openstack floating ip list -c ID -c "Floating IP Address" -c "Fixed IP Address"
604+ +--------------------------------------+---------------------+------------------+
605+ | ID | Floating IP Address | Fixed IP Address |
606+ +--------------------------------------+---------------------+------------------+
607+ | 0bca9878-4076-4cdf-a1b2-2325256829c7 | 202.49.242.221 | 10.0.0.221 |
608+ | ab487f0a-5fb3-428c-bce2-608dc2ced7ba | 202.49.241.238 | 10.0.0.125 |
609+ +--------------------------------------+---------------------+------------------+
610+
611+ .. warning ::
612+
613+ Cluster deletion does not currently respect the
614+ ``loadbalancer.openstack.org/keep-floatingip: "true" `` annotation on services
615+ with the ``LoadBalancer `` type which only applies when the annotated service
616+ is deleted but the cluster remains active. Floating IPs that you wish to
617+ reuse must be disassociated with all cluster resources before cluster
618+ deletion.
619+
620+ If none of the above resources are required, you may schedule the cluster for
621+ deletion.
622+
623+ .. code-block :: console
624+
625+ $ openstack coe cluster delete dev-cluster1
626+ Request to delete cluster dev-cluster1 has been accepted.
627+
628+ The cluster and its associated cloud resources will no longer be present in
629+ your project after a period of time. Persistent volumes provisioned by Cinder
630+ are the exception and will be preserved after a cluster is deleted regardless
631+ of their retention policy as these only apply during the cluster's active
632+ state.
633+
634+ .. code-block :: console
635+
636+ $ openstack volume list -c ID -c Name -c "Attached to"
637+ +--------------------------------------+------------------------------------------+----------------------------------------------+
638+ | ID | Name | Attached to |
639+ +--------------------------------------+------------------------------------------+----------------------------------------------+
640+ | af545633-43b8-4672-91f4-d0d9f19d5153 | pvc-8c0fff36-89a9-41b0-a121-b843f7a28671 | |
641+ +--------------------------------------+------------------------------------------+----------------------------------------------+
642+
643+
540644 .. _clusters-nodegroups :
541645
542646***********
0 commit comments