{"id":9420,"date":"2026-09-05T03:45:28","date_gmt":"2026-09-05T10:45:28","guid":{"rendered":"https:\/\/blog.networkpresence.co\/?p=9420"},"modified":"2026-09-05T17:20:06","modified_gmt":"2026-09-06T00:20:06","slug":"install-rke2-to-ubuntu-26","status":"publish","type":"post","link":"https:\/\/blog.networkpresence.co\/?p=9420","title":{"rendered":"Install RKE2 to Ubuntu 26"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">We have an Ubuntu 26.04 host which is not connected to the Internet, so can&#8217;t do the online\/default RKE2 install and needs the required install files downloaded and transferred to it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you&#8217;re running in a VM, ensure you have all the CPU flags exposed to the VM. eg: CPU pass-through<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This post will be cleaned up\/updated asap..<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Commands are:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>apt install -y curl ca-certificates apparmor apparmor-utils<br>swapoff -a<br>grep -n swap \/etc\/fstab<br>vi \/etc\/fstab ## disable swap<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br><code>modprobe overlay<br>modprobe br_netfilter<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br><code>cat &gt;\/etc\/modules-load.d\/rke2.conf &lt;&lt;'EOF'<br>overlay<br>br_netfilter<br>EOF<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>cat &gt;\/etc\/sysctl.d\/90-rke2.conf &lt;&lt;'EOF'<br>net.ipv4.ip_forward = 1<br>net.bridge.bridge-nf-call-iptables = 1<br>net.bridge.bridge-nf-call-ip6tables = 1<br>EOF<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>sysctl --system<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br><code>RKE2_VERSION='v1.36.4+rke2r1'<br>curl -sfL <a href=\"https:\/\/get.rke2.io\">https:\/\/get.rke2.io<\/a> -o install.sh<br>chmod +x install.sh<br><br>curl -fLO \"<a href=\"https:\/\/github.com\/rancher\/rke2\/releases\/download\/$%7BRKE2_VERSION\/+\/%2B%7D\/rke2.linux-amd64.tar.gz\">https:\/\/github.com\/rancher\/rke2\/releases\/download\/${RKE2_VERSION\/+\/%2B}\/rke2.linux-amd64.tar.gz<\/a>\"<br>curl -fLO \"<a href=\"https:\/\/github.com\/rancher\/rke2\/releases\/download\/$%7BRKE2_VERSION\/+\/%2B%7D\/sha256sum-amd64.txt\">https:\/\/github.com\/rancher\/rke2\/releases\/download\/${RKE2_VERSION\/+\/%2B}\/sha256sum-amd64.txt<\/a>\"<br>curl -fLO \"<a href=\"https:\/\/github.com\/rancher\/rke2\/releases\/download\/$%7BRKE2_VERSION\/+\/%2B%7D\/rke2-images.linux-amd64.tar.zst\">https:\/\/github.com\/rancher\/rke2\/releases\/download\/${RKE2_VERSION\/+\/%2B}\/rke2-images.linux-amd64.tar.zst<\/a>\"<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code><br><\/code>Copy install.sh, rke2-linux-amd64.tar.gz, rke2-images-linux-amd64.tar.zst  to the destination host, into directory \/root\/rke2-offline in our commands listed below.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code><br>cd \/root\/rke2-offline<br>INSTALL_RKE2_ARTIFACT_PATH=\/root\/rke2-offline sh .\/install.sh<br>which rke2<br>rke2 --version<br>ls -l \/usr\/local\/bin\/rke2*<br>mkdir -p \/var\/lib\/rancher\/rke2\/agent\/images<br>cp \/root\/rke2-offline\/rke2-images.linux-amd64.tar.zst \/var\/lib\/rancher\/rke2\/agent\/images\/<br>touch \/var\/lib\/rancher\/rke2\/agent\/images\/.cache.json<br>ls -la \/var\/lib\/rancher\/rke2\/agent\/images\/<br>mkdir -p \/etc\/rancher\/rke2<\/code><br><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>systemctl enable rke2-server<br>systemctl start rke2-server<br>systemctl status rke2-server<br>export PATH=$PATH:\/var\/lib\/rancher\/rke2\/bin<br>export KUBECONFIG=\/etc\/rancher\/rke2\/rke2.yaml<br>cat &gt;\/etc\/profile.d\/rke2.sh &lt;&lt;'EOF'<br>export PATH=$PATH:\/var\/lib\/rancher\/rke2\/bin<br>export KUBECONFIG=\/etc\/rancher\/rke2\/rke2.yaml<br>EOF<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>cat &gt;\/etc\/rancher\/rke2\/config.yaml &lt;&lt;'EOF'<br>write-kubeconfig-mode: \"0644\"<br>tls-san:<br>- rke2<br>- rke2.yourdomain.name<br>- 1.2.3.4<br>EOF<\/code><br><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Some diagnostic and information commands are:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>kubectl get nodes -o wide<br>kubectl get pods -n kube-system<br>kubectl get helmcharts -n kube-system<br>kubectl get ingressclass<br>kubectl get pods -A -o wide<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We have an Ubuntu 26.04 host which is not connected to the Internet, so can&#8217;t do the online\/default RKE2 install and needs the required install files downloaded and transferred to it. If you&#8217;re running in a VM, ensure you have &hellip; <a href=\"https:\/\/blog.networkpresence.co\/?p=9420\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[70],"tags":[],"class_list":["post-9420","post","type-post","status-publish","format-standard","hentry","category-sales"],"_links":{"self":[{"href":"https:\/\/blog.networkpresence.co\/index.php?rest_route=\/wp\/v2\/posts\/9420","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.networkpresence.co\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.networkpresence.co\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.networkpresence.co\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.networkpresence.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9420"}],"version-history":[{"count":4,"href":"https:\/\/blog.networkpresence.co\/index.php?rest_route=\/wp\/v2\/posts\/9420\/revisions"}],"predecessor-version":[{"id":9426,"href":"https:\/\/blog.networkpresence.co\/index.php?rest_route=\/wp\/v2\/posts\/9420\/revisions\/9426"}],"wp:attachment":[{"href":"https:\/\/blog.networkpresence.co\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9420"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.networkpresence.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9420"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.networkpresence.co\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}