This message was deleted.
# rke2
a
This message was deleted.
c
what does it mean? it doesn’t mean anything, its just a string
I think it was probably abbreviated from ‘NodeConfig’ since the pools create machines and nodes but that’s a guess.
its just arbitrary as far as I know, why do you ask?
g
I just noticed that the Rancher UI is using that prefix but the names of the nodes created do not have the prefix so I'm wondering if I can remove it from my script that calls the Rancher API to create a RKE2 cluster.
While on the topic of the API, I have a script that does a POST to
/v1/provisioning.cattle.io.clusters
and if I pass in
metadata.name=my-test-cluster
the
Clusters
page in the Rancher UI correctly lists the name of the cluster as
my-test-cluster
and when I click
View in API
it takes me to
/v1/provisioning.cattle.io.clusters/fleet-default/my-test-cluster
and I see that the
id
field includes the namespace and is
fleet-default/my-test-cluster
but when I click
Download KubeConfig
it calls
/v3/clusters/c-m-skbrfs6b?action=generateKubeconfig
so I was wondering what
c-m-skbrfs6b
is since it's not the cluster name I passed in nor the cluster ID but when viewing the cluster in the API I see that it's under
status.clusterName
.
The JSON response from the POST to create the cluster does not contain
status.clusterName
so I'm wondering if there is another way to download the kubeconfig via API without using that field or if my script needs to keep doing a GET to
/v1/provisioning.cattle.io.clusters/fleet-default/my-test-cluster
until the
status.clusterName
field is in the response...
c
These aren’t really RKE2 questions but Rancher questions.
My understanding is that most of the Rancher custom APIs for cluster management are deprecated for the newer provisioning frameworks, and you should be creating the corresponding custom resources directly using Kubernetes APIs.
g
My script creates machine config, creates a RKE2 cluster and then downloads the kubeconfig for the new cluster. I was under the impression that the RK-API (https://ranchermanager.docs.rancher.com/api/quickstart) could not create a cluster, is that not true? Would that be preferred over using the v1 API to create the cluster like the Rancher UI does?
c
I dunno. I’m a RKE2 dev, not Rancher.
g
And sorry this is the wrong channel, I thought it was RKE2 specific since the RKE1 cluster creation process called the v3 API
Ok I'll post in the #C3ASABBD1 channel then?
c
yeah. or you might search rancher issues on gh
there are not a LOT of rancher devs that have time to answer questions on here
g
Ok I'll try that first, thanks