This will describe how to identify clusters that are created by RKE, created by Rancher or managed by Rancher
Clusters created by RKE CLI have:
- Cluster state stored as Configmap called
full-cluster-state
in namespacekube-system
(cluster-state
before RKE v0.2.0)kubectl -n kube-system get configmap full-cluster-state
- No
cattle-system
namespace - No ServiceAccount named
kontainer-engine
in namespacecattle-system
Clusters created as described on https://rancher.com/docs/rancher/v2.x/en/cluster-provisioning/rke-clusters/ have:
- ServiceAccount named
kontainer-engine
in namespacecattle-system
kubectl -n cattle-system get sa kontainer-engine
- Cluster state stored as Configmap called
full-cluster-state
in namespacekube-system
(cluster-state
before Rancher v2.2.0)kubectl -n kube-system get configmap full-cluster-state
- Deployment
cattle-cluster-agent
and DeamonSetcattle-node-agent
in namespacecattle-system
kubectl -n cattle-system get deploy cattle-cluster-agent
kubectl -n cattle-system get ds cattle-node-agent
- ServiceAccount named
kontainer-engine
in namespacecattle-system
kubectl -n cattle-system get sa kontainer-engine
- No cluster state stored as Configmap called
full-cluster-state
in namespacekube-system
- Deployment
cattle-cluster-agent
and DeamonSetcattle-node-agent
in namespacecattle-system
kubectl -n cattle-system get deploy cattle-cluster-agent
kubectl -n cattle-system get ds cattle-node-agent
- No ServiceAccount named
kontainer-engine
in namespacecattle-system