-
Notifications
You must be signed in to change notification settings - Fork 669
Add example config to deploy kubernetes via RKE2 #1650
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
Conversation
@jandubois Please kindly review and let me know if you have any comments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried the template, and it works, but took about 15min for the instance to get ready because several images ended up in an ImagePullBackup state. I haven't tried to figure out why that happens.
I'm not sure about the naming; I would just call ist experimental/rke2.yaml
. Otherwise we should rename k8s
→ k8s-kubeadm
and k3s
→ k8s-k3s
because they are all different ways to install k8s
. @AkihiroSuda what do you think?
examples/experimental/k8s-rke2.yaml
Outdated
- mode: system | ||
script: | | ||
#!/bin/sh | ||
curl -sfL https://get.rke2.io | INSTALL_RKE2_CHANNEL=v1.27 sh - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewing this PR made me realize that we download the install script for k3s on each boot, whereas it is only needed on the first boot, so I created #1684.
I think a similar check should be added here too:
curl -sfL https://get.rke2.io | INSTALL_RKE2_CHANNEL=v1.27 sh - | |
if [ ! -d /var/lib/rancher/rke2 ]; then | |
curl -sfL https://get.rke2.io | INSTALL_RKE2_CHANNEL=v1.27 sh - | |
... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the comments.
I changed the filename to "experimental/rke2.yaml". And added that check.
Maybe the template should include a link to https://docs.rke2.io for references (and add a similar link to https://docs.k3s.io` to |
Signed-off-by: Hirozy <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM. Leaving it to @AkihiroSuda to merge if he is ok with the filename.
And FWIW, v1.27.4+rke2r1 was just released today:
$ KUBECONFIG="/Users/jan/.lima/rke2/copied-from-guest/kubeconfig.yaml" k get no
NAME STATUS ROLES AGE VERSION
lima-rke2 Ready control-plane,etcd,master 10m v1.27.4+rke2r1
Feel free to add https://docs.k8s.io/ to templates/k8s.yaml, in that case. There's some step-by-step links now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
RKE2 V1.27.3 has added support for the arm64 architecture, so there is one more way to deploy K8S on Apple Silicon. The
INSTALL_RKE2_CHANNEL=latest
indicates that the latestv1.27.x
is installed instead of the stablev1.25.x
. And I thinkk8s-rke2.yaml
should be inexamples/experimental
beforev1.27.x
becomes a stable channel.To avoid service unavailability due to
no_proxy
, use the variable with the prefixCONTAINERD_
according to the RKE2 documentation.