Skip to main content

Delete namespace migrated to live

This runbook is for namespaces which are migrated to live EKS cluster from live-1 cluster.

Check the below list before proceeding with the deletion

  • all dependencies to the namespace are removed. Some namespaces have terraform in one namespace creating k8s resources in another namespace. Raise PR and remove those dependencies in other namespaces
  • namespace folder exists in live.cloud-platform... folder in [env][https://github.com/ministryofjustice/cloud-platform-environments/tree/main/namespaces/live.cloud-platform.service.justice.gov.uk] repository
  • apply-live pipeline is applying the namespace and no changes needed
  • namespace exists in live cluster
  • all ingresses in that namespace in live has aws-weight annotation with value “100”
  • all ingresses in that namespace in live-1 has aws-weight annotation with value “0”
  • kibana logs for that namespace doesnot have any traffic flow for live-1
  • Check for any cronjobs/tzcronjobs or batch jobs running in live-1 and compare with the one in live.
    • If any queries, check with the team who owns the namespace.

To delete the namespace, target the live-1 cluster

run the command

kubectl delete ns <namespace>

For deleting a namespace from a cluster including terraform resources because it is not used anymore, follow Manually Delete Namespace Resources runbook.

This page was last reviewed on 22 October 2021. It needs to be reviewed again on 22 January 2022 by the page owner #cloud-platform .
This page was set to be reviewed before 22 January 2022 by the page owner #cloud-platform. This might mean the content is out of date.