Welcome to this guide on using k3sup (pronounced “ketchup”) to easily set up Kubernetes (K3s) on any virtual machine (VM), local or remote. Just like how ketchup quickly enhances your meals, k3sup swiftly gets you from zero to full Kubernetes configuration in just a few minutes! In this article, we’ll explore what k3sup is, how to use it, and troubleshoot common issues.
What is k3sup?
k3sup is a lightweight utility designed to install K3s – a lightweight Kubernetes distribution – on your chosen VM with just SSH access and the k3sup binary. Built using Go, it is cross-compilable for Linux, Windows, MacOS, and even Raspberry Pi. Think of it as your handy chef in the kitchen, simplifying a complex recipe into a few easy steps.
Why Use k3sup?
- Automates the process of installing K3s.
- Quickly fetches the KUBECONFIG for easy access to kubectl commands.
- Seamlessly integrates into CI/CD pipelines.
Quick Download Instructions (tl;dr)
You can download k3sup using the command below for Linux and MacOS:
curl -sLS https://get.k3sup.dev | sh
sudo install k3sup /usr/local/bin/k3sup
For Windows users, you can follow the instructions in the Releases page.
Set Up a Kubernetes Server with k3sup
You can set up a Kubernetes server using the following commands. Imagine this setup as setting up a new coffee maker in your kitchen – you want everything in the right place to brew that perfect cup.
export IP=192.168.0.1
k3sup install --ip $IP --user ubuntu
The command above connects to the VM via SSH and installs K3s at the specified IP address. Just substitute the IP with your own.
Joining Agents to Your Kubernetes Server
Once your server is up and running, you can join agents (nodes) to form a cluster. Think of agents as the helpers in your kitchen, working together to provide more capacity.
export AGENT_IP=192.168.0.101
export SERVER_IP=192.168.0.100
k3sup join --ip $AGENT_IP --server-ip $SERVER_IP --user ubuntu
Troubleshooting Common Issues
If you encounter issues while setting up k3sup, here are some solutions:
- SSH Connection Problems: Ensure that your SSH keys are correctly set. Use
ssh-copy-idto transfer your keys. - kubectl Not Working: Make sure you are running kubectl from your local machine, not the VM. If you lose your kubeconfig, run
k3sup install --skip-installto retrieve it. - Missing Commands: If you missed an installation step, check the service logs using
sudo journalctl -u k3s.
For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
Conclusion
With k3sup, bootstrapping Kubernetes has never been easier. In minutes, you can have a fully functioning Kubernetes environment ready for your applications. Remember, if you face any challenges, troubleshooting often leads to new learning opportunities!
At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

