Hi all,
i am trying to automate my Rancher setups. I works quite well except one small problem. If i create a new cluster with some simple API calls the cluster will be created but all namespaces (kube-system, cattle-system, default) are not in a project after the nodes joined the new cluster. But if i create a new cluster in the webui it all works fine. So i think i am missing something but i can’t find it.
Rancher: v2.1.6
Here is an example API call
curl -u "${CATTLE_ACCESS_KEY}:${CATTLE_SECRET_KEY}" \
-X POST \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"amazonElasticContainerServiceConfig":null, "azureKubernetesServiceConfig":null, "description":"Dev Cluster", "dockerRootDir":"/var/lib/docker", "googleKubernetesEngineConfig":null, "name":"dev", "rancherKubernetesEngineConfig":{}}' \
'https://localhost:8443/v3/clusters'
HTTP Request:
HTTP/1.1 POST /v3/clusters
Host: localhost:8443
Accept: application/json
Content-Type: application/json
Content-Length: 226
{
"amazonElasticContainerServiceConfig": null,
"azureKubernetesServiceConfig": null,
"description": "Dev Cluster",
"dockerRootDir": "/var/lib/docker",
"googleKubernetesEngineConfig": null,
"name": "dev",
"rancherKubernetesEngineConfig": { }
}
Do you have any idea what is missing? I know i can move namespace manually but i am trying to understand what’s going wrong.
Thank you very much.
Best regards