This message was deleted.
# general
a
This message was deleted.
a
What kind of cluster does your Rancher instance reside on?
Also, when creating downstream clusters you can enable the
authorised endpoint
feature that gives you direct access to the cluster
g
The cluster's on on on-prem OpenStack cluster - I have access to the VMs' so can see the docker containers running on those nodes. Sadly the "authorised endpoint" feature wasn't set, so I don't have a config with the control endpoint. But I see the
kube-apiservice
and its container ENV. SO I just wondered whether the certs or other material is available to me to manufacture a downstream config by hand?
a
Is it an RKE2/K3s cluster?
g
It's an rke v1 k8s cluster
a
When you initially ran
rke up
it would have generated a kubeconfig that auths directly to the API server. Failing that, ssh to one of your rancher management cluster nodes. Install kubectl and run:
Copy code
kubectl --kubeconfig $(docker inspect kubelet --format '{{ range .Mounts }}{{ if eq .Destination "/etc/kubernetes" }}{{ .Source }}{{ end }}{{ end }}')/ssl/kubecfg-kube-node.yaml get configmap -n kube-system full-cluster-state -o json | jq -r .data.\"full-cluster-state\" | jq -r .currentState.certificatesBundle.\"kube-admin\".config | sed -e "/^[[:space:]]*server:/ s_:.*_: \"<https://127.0.0.1:6443>\"_" > kubeconfig_admin.yaml
kubectl --kubeconfig kubeconfig_admin.yaml get nodes
g
Wonderful! That's worked! Thank you.
a
You're welcome.