Skip to content

Instantly share code, notes, and snippets.

@egernst
Last active November 3, 2019 19:55
Show Gist options
  • Save egernst/a6a6d48b2a23cda43abc0a1ae04e5510 to your computer and use it in GitHub Desktop.
Save egernst/a6a6d48b2a23cda43abc0a1ae04e5510 to your computer and use it in GitHub Desktop.
hacking k8s

kubeadm-config.yaml:

---
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
# Allowing for CPU pinning and isolation in case of guaranteed QoS class
-featureGates:
-  PodOverhead: true
cpuManagerPolicy: static
systemReserved:
  cpu: 500m
  memory: 256M
kubeReserved:
  cpu: 500m
  memory: 256M
---
apiVersion: kubeadm.k8s.io/v1beta1
kind: ClusterConfiguration
networking:
  dnsDomain: cluster.local
  podSubnet: 10.244.0.0/16
  serviceSubnet: 10.96.0.0/12
  apiServer:
  extraArgs:
    feature-gates: PodOverhead=true
  scheduler:
  extraArgs:
    feature-gates: PodOverhead=true

Runtime Class definition for Kata:

Kata Overhead example:

---
kind: RuntimeClass
apiVersion: node.k8s.io/v1beta1
metadata:
    name: kata-qemu
handler: kata-qemu
overhead:
    podFixed:
        memory: "100"
        cpu: "250m"

setup Kata:

kubectl apply -f https://raw.githubusercontent.com/kata-containers/packaging/master/kata-deploy/kata-rbac.yaml
kubectl apply -f https://raw.githubusercontent.com/kata-containers/packaging/master/kata-deploy/kata-deploy.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment