Cloning kubernetes cluster in rancher does not work

12/15/2021

I am following https://rancher.com/docs/rancher/v2.5/en/cluster-admin/cloning-clusters/ to clone my cluster to a different rancher server.

My rancher version 2.5.9 and I am using rancher cli 2.6.0.

After I export my rancher config using export command and modify the configuration with the new cluster name, I use

./rancher up --file cluster-config.yml 

to create my new cluster, the cluster does not appear in the UI or using cluster cli list i enabled debug and I can see the request and the response but the cluster is no where to be found

POST https://localhost/v3/composeconfigs
Request => {"links":null,"actions":null,"rancherCompose":"Version: v3\nclusters:\n  testcluster:\n    answers: {}\n    dockerRootDir: /var/lib/docker\n    enableNetworkPolicy: false\n    fleetWorkspaceName: fleet-default\n    localClusterAuthEndpoint: {}\n    rancherKubernetesEngineConfig:\n      addonJobTimeout: 30\n      authentication:\n        strategy: x509\n      authorization: {}\n      bastionHost: {}\n      cloudProvider: {}\n      ignoreDockerVersion: true\n      ingress:\n        defaultBackend: true\n        provider: nginx\n      kubernetesVersion: v1.20.11-rancher1-1\n      monitoring:\n        provider: metrics-server\n        replicas: 1\n      network:\n        plugin: canal\n      restore: {}\n      services:\n        etcd:\n          backupConfig:\n            enabled: true\n            intervalHours: 12\n            retention: 6\n          creation: 12h\n          extraArgs:\n            election-timeout: \"5000\"\n            heartbeat-interval: \"500\"\n          retention: 72h\n          snapshot: false\n        kubeApi:\n          serviceNodePortRange: 30000-32767\n        kubeController: {}\n        kubelet: {}\n        kubeproxy: {}\n        scheduler: {}\n      upgradeStrategy:\n        drain: false\n        maxUnavailableControlplane: \"1\"\n        maxUnavailableWorker: 10%\n\n"}
Response <= {"annotations":{},"baseType":"composeConfig","created":"2021-12-15T23:13:22Z","createdTS":1639610002000,"creatorId":"user-fvxvv","id":"cc-d5k2x","labels":{"cattle.io/creator":"norman"},"links":{"remove":"https://localhost/v3/composeConfigs/cc-d5k2x","self":"https://localhost/v3/composeConfigs/cc-d5k2x","update":"https://localhost/v3/composeConfigs/cc-d5k2x"},"name":"cc-d5k2x","rancherCompose":"Version: v3\nclusters:\n  testcluster:\n    answers: {}\n    dockerRootDir: /var/lib/docker\n    enableNetworkPolicy: false\n    fleetWorkspaceName: fleet-default\n    localClusterAuthEndpoint: {}\n    rancherKubernetesEngineConfig:\n      addonJobTimeout: 30\n      authentication:\n        strategy: x509\n      authorization: {}\n      bastionHost: {}\n      cloudProvider: {}\n      ignoreDockerVersion: true\n      ingress:\n        defaultBackend: true\n        provider: nginx\n      kubernetesVersion: v1.20.11-rancher1-1\n      monitoring:\n        provider: metrics-server\n        replicas: 1\n      network:\n        plugin: canal\n      restore: {}\n      services:\n        etcd:\n          backupConfig:\n            enabled: true\n            intervalHours: 12\n            retention: 6\n          creation: 12h\n          extraArgs:\n            election-timeout: \"5000\"\n            heartbeat-interval: \"500\"\n          retention: 72h\n          snapshot: false\n        kubeApi:\n          serviceNodePortRange: 30000-32767\n        kubeController: {}\n        kubelet: {}\n        kubeproxy: {}\n        scheduler: {}\n      upgradeStrategy:\n        drain: false\n        maxUnavailableControlplane: \"1\"\n        maxUnavailableWorker: 10%","state":"active","transitioning":"no","transitioningMessage":"","type":"composeConfig","uuid":"7f4cf609-b716-4069-966b-7095b63fd901"}
-- Mia Mois
kubernetes
rancher

0 Answers