Skip to content

Instantly share code, notes, and snippets.

@clemenko
Last active March 6, 2026 07:33
Show Gist options
  • Select an option

  • Save clemenko/e3a823732c23813b43ac18fef0b24498 to your computer and use it in GitHub Desktop.

Select an option

Save clemenko/e3a823732c23813b43ac18fef0b24498 to your computer and use it in GitHub Desktop.

k3s airgap

Docs

https://docs.k3s.io/installation/airgap#manually-deploy-images-method
https://github.com/k3s-io/k3s/

download

# download these
mkdir /opt/k3s && cd /opt/k3s
curl -#LO https://github.com/k3s-io/k3s/releases/download/v1.32.1%2Bk3s1/k3s
curl -#L  https://get.k3s.io -o install.sh
curl -#LO https://github.com/k3s-io/k3s/releases/download/v1.32.1%2Bk3s1/k3s-airgap-images-amd64.tar

#Note - not needed for Debain based systems.
curl -#LO https://github.com/k3s-io/k3s-selinux/releases/download/v1.6.stable.1/k3s-selinux-1.6-1.el9.noarch.rpm
chmod 755 k3s install.sh

tar and move

this step should be self explanatory.

# compress
cd /opt/k3s
tar -vzcf /opt/k3s_airgapped.tgz $(ls)
# decompress
mkdir /opt/k3s
tar -vzxf /opt/k3s_airgapped.tgz -C /opt/k3s

install

run as root

cd /opt/k3s
mkdir -p /var/lib/rancher/k3s/agent/images/ 
mv k3s /usr/local/bin/
mv k3s-airgap-images-amd64.tar /var/lib/rancher/k3s/agent/images/

#Note - not needed for Debain based systems.
yum install -y container-selinux k3s-selinux-1.4-1.el9.noarch.rpm

INSTALL_K3S_SKIP_DOWNLOAD=true ./install.sh
@clemenko

clemenko commented Feb 1, 2025

Copy link
Copy Markdown
Author

Good call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment