https://rancher.com/ logo
c

careful-article-61190

11/11/2022, 6:35 PM
Hi also i have to patch this
Copy code
kubectl -n cattle-system patch  deployments cattle-cluster-agent --patch '{
    "spec": {
        "template": {
            "spec": {
                "hostAliases": [
                    {
                      "hostnames":
                      [
                        "<http://stage-k8senv1.xxx.se|stage-k8senv1.xxx.se>"
                      ],
                      "ip": "172.20.10.100"
                    },
                    {
                      "hostnames":
                      [
                        "<http://stage-k8senv1.xxx.se|stage-k8senv1.xxx.se>"
                      ],
                      "ip": "172.20.10.101"
                    }

                ]
            }
        }
    }
}'
Which allows cluster agent to connect. Any permanent solution? when we create downstreame cluster in rancher it should work out of the box?
c

creamy-pencil-82913

11/11/2022, 6:41 PM
why do you have to patch the deployment to inject hostnames? DO you not have working DNS?
c

careful-article-61190

11/11/2022, 6:45 PM
well I need to ask our ID administrator to add DNS entries. so rancher doesnt resolve automatic we need dns entries defined?
c

creamy-pencil-82913

11/11/2022, 7:05 PM
How would that work exactly? Rancher does not have the ability to create DNS entires in your DNS server for you. If you specify a hostname for something outside the cluster, that hostname needs to actually exist.
1
🙃 1
c

careful-article-61190

11/11/2022, 7:29 PM
Yes you right its basics 😄
thanks brandond for clarifying 🙂
3 Views