https://github.com/pyaillet/k3s-vagrant-setup
https://github.com/pyaillet/k3s-vagrant-setup
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/pyaillet/k3s-vagrant-setup
- Owner: pyaillet
- License: mit
- Created: 2020-03-21T14:34:30.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-23T14:58:54.000Z (over 6 years ago)
- Last Synced: 2025-03-30T12:11:20.266Z (over 1 year ago)
- Language: Shell
- Size: 13.7 KB
- Stars: 9
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# k3s vagrant setup
Minimal [vagrant](https://www.vagrantup.com/) setup to test [k3s](https://k3s.io/).
Use `./up.sh` to spawn a `k3s` cluster composed of 1 server and 3 agents.
Use `./clean.sh` to clean things up.
You can adapt the `Vagrantfile` if you need to change the composition of the
cluster.
## Caveats
The biggest challenge with this setup was virtualbox related.
Using virtualbox, I add two ifaces to each vm:
- A NAT iface used for external connectivity
- A hostnet iface used for node to node and host to node connections
By default k3s and flannel pick the NAT one. Some configuration is needed to:
- tell k3s which IP address it should advertise for the node
- tell flannel which iface should be used to route traffic to others nodes
These configuration options are set in the systemd services (`NODE_IP` and
`--flannel-iface`).