nctl remove cluster

nctl remove cluster

Remove cluster

nctl remove cluster [flags]

Examples


  # Remove a cluster using its name
  nctl remove cluster --cluster-name my-cluster

  # Remove a cluster using its unique cluster ID (Overrides name if provided)
  nctl remove cluster --cluster-id my-cluster-id

  # Deregister a cluster from Nirmata Control Hub (NCH) without uninstalling components
  nctl remove cluster --cluster-name my-cluster --deregister-only

  # Remove only the operator from the cluster without removing other components
  nctl remove cluster --cluster-name my-cluster --remove-operator-only

  # Forcefully remove a cluster, ignoring the kube-system namespace UID check
  nctl remove cluster --cluster-name my-cluster --force

  # Remove a cluster by specifying a custom kubeconfig file and context
  nctl remove cluster --cluster-name my-cluster --kubeconfig /path/to/kubeconfig --kube-context my-context

  # Remove a cluster while allowing connection to an address with a self-signed or unverified certificate (not recommended)
  nctl remove cluster --cluster-name my-cluster --insecure

  # Remove a cluster using Nirmata credentials
  nctl remove cluster --cluster-name my-cluster --token my-nirmata-token --url https://nirmata.example.com

Options

      --cluster-id string      the Nirmata Control Hub (NCH) cluster Id of cluster to be removed (Overrides name. Needed if cluster name is not unique)
      --cluster-name string    the Nirmata Control Hub (NCH) cluster name of cluster to be removed
      --crd-release string     release name for the operator CRD helm chart (default "kyverno-operator-crd")
      --deregister-only        only deresgisters cluster from nch
      --force                  force remove cluster ignoring empty kube-system namespace uid check
  -h, --help                   help for cluster
      --insecure               allow connection to an address with a self-signed or non-verifiable certificate (not recommended)
      --kube-context string    the kube context from configured kubeconfig. Default is the current or sole context
      --kubeconfig string      kubeconfig path (defaults to $HOME/.kube/kubeconfig)
  -n, --namespace string       namespace in which the operator is deployed (default "nirmata-system")
      --release string         release name for the operator helm chart (default "kyverno-operator")
      --remove-operator-only   remove only operator from cluster, removes all components by default
      --timeout duration       time to wait until the operation terminates (default 10m0s)
      --token string           Nirmata API Login Key (env NIRMATA_TOKEN)
      --url string             Nirmata server base URL (env NIRMATA_URL)

Options inherited from parent commands

  -v, --v Level   log level for V logs

SEE ALSO

  • nctl remove - Remove Nirmata Control Hub (NCH) resources