Skip to content

microk8s configuration notes

Stéphane Bidoul edited this page Oct 1, 2022 · 7 revisions

This page describes a simple microk8s configuration for a single node cluster.

microk8s configuration

The following microk8s addons can be enabled:

  • dns
  • ingress see ingress
  • hostpath-storage (for a single node cluster local storage)

In /var/snap/microk8s/common/args/kube-apiserver, change service-cluster-ip-range to 10.152.0.0/16 to allow deploying up to ~65k builds. Otherwise it is limited to ~255 builds and we have the error Internal error occurred: failed to allocate a serviceIP: range is full.

The default maximum number of pods per nodes is 110. Be sure to configure RUNBOAT_MAX_STARTED, RUNBOAT_MAX_INITIALIZING and the kubelet's --max-pods option so the maximum number of started and initializing builds is well below the total number of pods allowed in your cluster.

namespace and service account

kind: Namespace
apiVersion: v1
metadata:
  name: runboat-builds
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: runboat-build-user
  namespace: runboat-builds
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: runboat-builds-full-access
  namespace: runboat-builds
rules:
- apiGroups: ["", "networking.k8s.io", "apps", "batch"]
  resources: ["*"]
  verbs: ["get", "create", "update", "patch", "delete"]
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: runboat-builds-full-access-runboat-build-user
  namespace: runboat-builds
subjects:
- kind: ServiceAccount
  name: runboat-build-user
  namespace: runboat-builds
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: runboat-builds-full-access
Clone this wiki locally