Skip to content

Instantly share code, notes, and snippets.

@allanlei
Created September 15, 2018 21:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save allanlei/917dfeb7060d822a4f69bec453a3ad3e to your computer and use it in GitHub Desktop.
Save allanlei/917dfeb7060d822a4f69bec453a3ad3e to your computer and use it in GitHub Desktop.
Kubernetes System THP nodeAffinity
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis
spec:
replicas: 1
selector:
matchLabels:
app: redis
template:
metadata:
labels:
app: redis
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: sysctl/mm.transparent_hugepage.enabled
operator: In
values:
- "never"
- key: sysctl/mm.transparent_hugepage.defrag
operator: In
values:
- "never"
containers:
- name: redis
image: redis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment