Skip to content

Instantly share code, notes, and snippets.

@fortejas
Created May 21, 2021 16:12
Show Gist options
  • Save fortejas/2ad13cdf2d6b21937d0d1893dc5ebfcb to your computer and use it in GitHub Desktop.
Save fortejas/2ad13cdf2d6b21937d0d1893dc5ebfcb to your computer and use it in GitHub Desktop.
EKS Bare Metal with CPU Manager Configured

Setup for EKS Bare Metal with CPU Manager Configured

This provisions an EKS cluster with CPU Management Policies confiured to static.

The instance type in the node group is m5.metal.

Setup

$ # Provision EKS Cluster
$ eksctl create cluster -f ./cluster-config.yaml

Deploy an Application with Guaranteed QoS

$ kubectl apply -f sample-app.yaml
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: bare-metal
region: eu-west-1
nodeGroups:
- name: ng-cpu-managed
instanceType: m5.metal
desiredCapacity: 2
placement:
groupName: sample-placement-group
ssh:
enableSsm: true
kubeletExtraConfig:
cpuManagerPolicy: static
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: qos-cpu-manager
name: qos-cpu-manager
spec:
replicas: 1
selector:
matchLabels:
app: qos-cpu-manager
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: qos-cpu-manager
spec:
containers:
- image: nginx
name: nginx
resources:
limits:
memory: "200Mi"
cpu: "2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment