Link

CoreOS

A minimal operating system designed for running containerized workloads.

Table of contents

  1. Variants
  2. Ignition
  3. Caveats

Variants

There are currently two main branches:

  • RedHat CoreOS
    • Desiged specifically for OpenShift 4, already used in production
  • Fedora CoreOS
    • Designed to be a minimal, but still general purpose OS

Ignition

A simple configuration file to provision the host via PXE boot. Fedora recommends to write a YAML file and transform this into an Ignition file. An example to start a minimal K3S server:

docker run -i --rm quay.io/coreos/fcct:latest --pretty --strict < k3s-server.yaml > ../tftp/fcos/k3s-server.json
variant: fcos
version: 1.0.0

passwd:
  users:
    - name: core
      ssh_authorized_keys:
        - "ssh-rsa AAAA..."

storage:
  files:
    # K3S
    - path: "/usr/local/bin/k3s"
      user:
        name: root
      group:
        name: root
      mode: 0755
      contents:
        source: "https://github.com/rancher/k3s/releases/download/v1.0.0/k3s"
        verification:
          hash: sha512-bbea8cd86a5c660e646b002a013593d25d9c20bb1194f2d9bd4ecaa60eb9d43bda368e313c5f09df6c6d5d2602e3235bb366336c1a2fd57f3042f05ff09f3de4

systemd:
  units:
    - name: k3s.service
      enabled: true
      contents: |
        [Unit]
        Description=Lightweight Kubernetes
        Documentation=https://k3s.io
        After=network-online.target

        [Install]
        WantedBy=multi-user.target

        [Service]
        Type=notify
        KillMode=process
        Delegate=yes
        LimitNOFILE=infinity
        LimitNPROC=infinity
        LimitCORE=infinity
        TasksMax=infinity
        TimeoutStartSec=0
        Restart=always
        RestartSec=5s
        ExecStartPre=-/sbin/modprobe br_netfilter
        ExecStartPre=-/sbin/modprobe overlay
        ExecStart=/usr/local/bin/k3s server

See: https://github.com/coreos/fcct/tree/master/docs

Caveats

Fedora CoreOS is more progressive than RedHat CoreOS. I have an issue to run Ceph via Rook via k3s. See the Fedora CoreOS Tracker.