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-statein namespacekube-system(cluster-statebefore RKE v0.2.0)kubectl -n kube-system get configmap full-cluster-state
- No
cattle-systemnamespace - No ServiceAccount named
kontainer-enginein namespacecattle-system
Clusters created as described on https://rancher.com/docs/rancher/v2.x/en/cluster-provisioning/rke-clusters/ have:
- ServiceAccount named
kontainer-enginein namespacecattle-systemkubectl -n cattle-system get sa kontainer-engine
- Cluster state stored as Configmap called
full-cluster-statein namespacekube-system(cluster-statebefore Rancher v2.2.0)kubectl -n kube-system get configmap full-cluster-state
- Deployment
cattle-cluster-agentand DeamonSetcattle-node-agentin namespacecattle-systemkubectl -n cattle-system get deploy cattle-cluster-agentkubectl -n cattle-system get ds cattle-node-agent
- ServiceAccount named
kontainer-enginein namespacecattle-systemkubectl -n cattle-system get sa kontainer-engine
- No cluster state stored as Configmap called
full-cluster-statein namespacekube-system
- Deployment
cattle-cluster-agentand DeamonSetcattle-node-agentin namespacecattle-systemkubectl -n cattle-system get deploy cattle-cluster-agentkubectl -n cattle-system get ds cattle-node-agent
- No ServiceAccount named
kontainer-enginein namespacecattle-system