Skip to content

Instantly share code, notes, and snippets.

@hunzo
Created September 20, 2024 04:02
Show Gist options
  • Save hunzo/571a90bac63c69c7ccb3e7b2e818e3d1 to your computer and use it in GitHub Desktop.
Save hunzo/571a90bac63c69c7ccb3e7b2e818e3d1 to your computer and use it in GitHub Desktop.
install k3s
#!/bin/bash
# install k3s
curl -sfL https://get.k3s.io | sh -
# add auto completion
echo 'alias kubectl="sudo k3s kubectl"' >> ~/.bashrc
echo 'alias k="kubectl"' >> ~/.bashrc
echo "source <(kubectl completion bash)" >> ~/.bashrc
echo "complete -o default -F __start_kubectl k" >> ~/.bashrc
source .bashrc
# uninstall k3s - server
# /usr/local/bin/k3s-uninstall.sh
# uninstall k3s - agent
# /usr/local/bin/k3s-agent-uninstall.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment