Skip to content

A lightweight Kubernetes engine that deploys k3s clusters declaratively based on a cluster configuration file.

License

Notifications You must be signed in to change notification settings

nicklasfrahm/k3se

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

k3se 🧀

Go Report Card Release Go Reference

A lightweight Kubernetes engine that deploys k3s clusters declaratively based on a cluster configuration file. The name is an abbreviation for k3s engine and a hommage to the German word for cheese, Käse [ˈkɛːzə].

Quickstart 💡

If you want to test k3se you can use Vagrant. All examples in the examples/ folder can be used with the provided Vagrantfile that provisions 3 Ubuntu VMs. To bring up the VMs you can run the following command:

make vagrant-up

Once you are done testing, you can destroy the VMs with the following command:

make vagrant-down

Prerequisites 📝

The nodes have to be accessible via SSH, either directly or via a bastion host. Further, the user on the remote nodes needs to have passwordless sudo set up. If this is not yet the case, you may manually do so via the following command:

echo "$(whoami) ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/$(whoami)

Limitations 🚨

The following features are currently not supported, but are planned for future releases:

  • Downsizing
    If nodes are removed from the cluster configuration, they are not decommissioned. We plan to enable this feature in the future; performing operations similar to kubectl cordon and kubectl drain automagically.
  • Diffing
    Using the git history of the cluster configuration to display potential actions that can be taken to bring the cluster up to date with the configuration.

GitHub Actions 🤖

You can use GitHub Actions to run k3se inside your CI pipeline. Simply add the following workflow:

name: Deploy

on:
  push:
    branches:
      - main

jobs:
  kubernetes:
    name: Kubernetes
    runs-on: ubuntu-latest
    steps:
      - name: Check out repository
        uses: actions/checkout@v3

      - name: Deploy k3s cluster
        uses: nicklasfrahm/k3se@main
        with:
          command: up examples/standalone.yml

Input variables ⚙️

See action.yml for more detailed information. Please note that all input variables must have string values. It is thus recommend to always use quotes.

Input variable Default value Description
command up Subcommand to be executed. Use up path/to/my/config.yaml to specify a custom location for your cluster spec.
version latest Version of k3se to use.

License 📄

This project is and will always be licensed under the terms of the MIT license.

About

A lightweight Kubernetes engine that deploys k3s clusters declaratively based on a cluster configuration file.

Topics

Resources

License

Stars

Watchers

Forks