Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Arthur
Arthur

Posted on

     

Kubernetes (RKE2)

This guide will help you quickly launch a cluster with default options for Rancher Kubernetes Engine

Prerequisites

Make sure your environment fulfills the requirements. If NetworkManager is installed and enabled on your hosts, ensure that it is configured to ignore CNI-managed interfaces.

NOTE: For RKE2 versions 1.21 and higher, if the host kernel supports AppArmor, the AppArmor tools (usually available via the apparmor-parser package) must also be present prior to installing RKE2.

The RKE2 installation process must be run as the root user or through sudo.

Server Node Installation

RKE2 provides an installation script that is a convenient way to install it as a service on systemd based systems. This script is available athttps://get.rke2.io. To install RKE2 using this method do the following:

1. Run the installer

curl-sfL https://get.rke2.io | sh -
Enter fullscreen modeExit fullscreen mode

This will install the rke2-server service and the rke2 binary onto your machine. Due to its nature, It will fail unless it runs as the root user or through sudo.

2. Enable the rke2-server service

systemctlenablerke2-server.service
Enter fullscreen modeExit fullscreen mode

3. Start the service

systemctl start rke2-server.service
Enter fullscreen modeExit fullscreen mode

4. Follow the logs, if you like

journalctl-u rke2-server-f
Enter fullscreen modeExit fullscreen mode

Conclusion:

The rke2-server service will be installed. The rke2-server service will be configured to automatically restart after node reboots or if the process crashes or is killed.
Additional utilities will be installed at /var/lib/rancher/rke2/bin/.

They include: kubectl, crictl, and ctr. Note that these are not on your path by default.

Two cleanup scripts, rke2-killall.sh and rke2-uninstall.sh, will be installed to the path at:

/usr/local/bin for regular file systems

/opt/rke2/bin for read-only and brtfs file systems

INSTALL_RKE2_TAR_PREFIX/bin if INSTALL_RKE2_TAR_PREFIX is set

A kubeconfig file will be written to /etc/rancher/rke2/rke2.yaml.

A token that can be used to register other servers or agent nodes will be created at /var/lib/rancher/rke2/server/node-token

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Software Developer with a focus on Cloud Infrastructure
  • Location
    Lusaka
  • Work
    Software Engineer
  • Joined

More fromArthur

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp