kubernetes-guide/codeblock/sysctl/set=sysctl-security-context...

26 lines
486 B
YAML
Raw Normal View History

2023-10-14 14:38:25 +08:00
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
spec:
replicas: 1
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
# highlight-add-start
securityContext:
sysctls:
- name: net.core.somaxconn
value: "1024"
- name: net.core.somaxconn
value: "1024"
# highlight-add-end
containers:
- name: nginx
image: nginx:latest