Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cluster-etcd secret is not created during cloud-init setup #403

Closed
simplysoft opened this issue Aug 12, 2024 · 0 comments · Fixed by #404
Closed

cluster-etcd secret is not created during cloud-init setup #403

simplysoft opened this issue Aug 12, 2024 · 0 comments · Fixed by #404
Labels
kind/bug Something isn't working needs-priority Indicates an issue or PR needs a priority assigning to it needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@simplysoft
Copy link
Contributor

What happened:

test-controlplane-4mnbm cloud-init[1023]: /var/lib/cloud/instance/scripts/runcmd: 7: kubectl: not found

relevant excerpt fron cloud-init userdata generated by provider:

 - 'kubectl create secret tls cluster-etcd -o yaml --dry-run=client -n kube-system --cert=/var/lib/rancher/rke2/server/tls/etcd/server-ca.crt --key=/var/lib/rancher/rke2/server/tls/etcd/server-ca.key --kubeconfig /etc/rancher/rke2/rke2.yaml | kubectl apply -f- --kubeconfig /etc/rancher/rke2/rke2.yaml'

as a result, we constantly get the following info log message
Cluster does not provide etcd certificates for creating child etcd ctrlclient.Please scale up the CP nodes by one to bootstrap the etcd secret content." controller="rke2controlplane" controllerGroup="controlplane.cluster.x-k8s.io" controllerKind="RKE2ControlPlane" [...]

What did you expect to happen:
Full path to rke2 kubectl binary be used /var/lib/rancher/rke2/bin/kubectl or $PATH being modified properly before the invocation

How to reproduce it:
Setup a new cluster

Environment:

  • rke provider version: 0.5.0
  • OS: Ubuntu 24.04 LTS (noble-server-cloudimg 20240806)
@simplysoft simplysoft added kind/bug Something isn't working needs-priority Indicates an issue or PR needs a priority assigning to it needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Aug 12, 2024
simplysoft added a commit to simplysoft/cluster-api-provider-rke2 that referenced this issue Aug 12, 2024
ensures that cluster-etcd secret can be created if host does not have kubectl installed

fixes rancher#403
simplysoft added a commit to simplysoft/cluster-api-provider-rke2 that referenced this issue Aug 13, 2024
ensures that cluster-etcd secret can be created if host does not have kubectl installed

fixes rancher#403

Signed-off-by: Simplysoft GmbH <1588210+simplysoft@users.noreply.github.com>
simplysoft added a commit to simplysoft/cluster-api-provider-rke2 that referenced this issue Aug 13, 2024
ensures that cluster-etcd secret can be created if host does not have kubectl installed

fixes rancher#403

Signed-off-by: Simplysoft GmbH <1588210+simplysoft@users.noreply.github.com>
simplysoft added a commit to simplysoft/cluster-api-provider-rke2 that referenced this issue Aug 13, 2024
ensures that cluster-etcd secret can be created if host does not have kubectl installed

fixes rancher#403

Signed-off-by: Simplysoft GmbH <1588210+simplysoft@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working needs-priority Indicates an issue or PR needs a priority assigning to it needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant