GithubHelp home page GithubHelp logo

action-k3s-helm's Introduction

GitHub Action: Install K3s, Calico and Helm

GitHub Action badge

Creates a Kubernetes cluster using K3s (1.17+) with Calico (3.20) for NetworkPolicy enforcement, and installs Helm (3.1+).

Optional input parameters

  • k3s-version or k3s-channel: Specify a K3s version or release channel. Versions 1.16 and later are supported. Defaults to the stable channel.
  • helm-version: Specify a Helm version. Versions 3.1 and later are supported. Defaults to the latest version.
  • metrics-enabled: Enable or disable K3S metrics-server, true (default) or false.
  • traefik-enabled: Enable or disable K3S Traefik ingress, true (default) or false.
  • docker-enabled: Enable K3s to use the Docker daemon, true or false (default).
  • extra-setup-args: Extra arguments passed unquoted to the K3s setup script, use this if you require advanced customisation.

Outputs

  • kubeconfig: The absolute path to the kubeconfig file ($HOME/.kube/config). The KUBECONFIG environment variable is also set by this action but may be removed in a future breaking release.
  • k3s-version: Installed k3s version, such as v1.20.0+k3s2
  • k8s-version: Installed k8s version, such as v1.20.0
  • calico-version: Installed calico version, such as v3.17.1
  • helm-version: Installed helm version, such as v3.4.2

Example

name: Example workflow

on:
  pull_request:
  push:
  workflow_dispatch:

jobs:
  k8s-test:
    runs-on: ubuntu-20.04
    steps:
      # GitHub Action reference: https://github.com/jupyterhub/action-k3s-helm
      - name: Start a local k8s cluster
        uses: jupyterhub/action-k3s-helm@v2
        with:
          # See available:
          # - k3s release channels at https://github.com/k3s-io/k3s/blob/HEAD/channel.yaml
          # - k3s versions at https://github.com/k3s-io/k3s/tags
          # - helm versions at https://github.com/helm/helm/tags
          k3s-channel: latest
          # k3s-version: v1.22.2+k3s1
          # helm-version: v3.7.0

      - name: Verify function of k8s, kubectl, and helm
        run: |
          echo "kubeconfig: $KUBECONFIG"
          kubectl version
          kubectl get pods --all-namespaces

          helm version
          helm list

Development

This is based on https://github.com/jupyterhub/zero-to-jupyterhub-k8s/blob/08c13609c1d0c6cb07d45d49d0a876100cf941eb/ci/common by @consideratio.

This action aims to to provide an easy to use Kubernetes cluster with the following features:

  • K3s
  • Helm 3+
  • Calico network provider that supports network policies

A small number of features are configurable. All K3s defaults are kept except where they conflict with the deployment of Calico. Due to the difficulty in comprehensively testing this action the aim is to minimise the number of arguments. If you have an advanced use case hopefully extra-setup-args will be sufficient.

action-k3s-helm's People

Contributors

consideratio avatar manics avatar pre-commit-ci[bot] avatar clkao avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.