Deregistering a cluster
If you are finished using a connected cluster, you can deregister it. After it's
deregistered, the cluster is no longer visible in the Amazon EKS console.
You must have the following permissions to call the deregisterCluster API:
This process involves two steps: Deregistering the cluster with Amazon EKS and uninstalling the eks-connector agent in the cluster.
To deregister the Kubernetes cluster
- AWS CLI
-
Prerequisites
-
AWS CLI must be installed. To install or upgrade it, see Installing the
AWS CLI.
-
Ensure the Amazon EKS Connector agent role was created.
.
Deregister the connected cluster.
aws eks deregister-cluster \
--name my-cluster
\
--region region-code
- AWS Management Console
-
- eksctl
-
To deregister your cluster with eksctl
To clean up the resources in your Kubernetes cluster
- Helm
-
- YAML manifest
-
-
Delete the Amazon EKS Connector YAML file from your Kubernetes cluster.
kubectl delete -f eks-connector.yaml
-
If you created clusterrole
or clusterrolebindings
for
additional IAM principals to access the cluster, delete them from your Kubernetes
cluster.