How to import cluster to rancher?
- in rancher cluster configuration, select
Generic - give it a name.
- copy the command needed and run it on a kubectl machine that has access to the cluster
- change yaml of
deployment/cattle-cluster-agent -n cattle-system
bash
kubectl edit deployment/cattle-cluster-agent -n cattle-system- look for an env var named
STRICT_VERIFYand change it from"true"to"false" - it might need to be changed twice, for reason we don't yet understand. so after changing the first time, verify the change, if the change didn't get applied, do it again.
- on cloudflare security rule, make sure the NAT ip of the cluster we want to import is allowed to access
cmgmt.truewatch.io