Добавил примеры daemonset
This commit is contained in:
parent
c1ce0dcb2d
commit
d961c9ce6e
3 changed files with 68 additions and 0 deletions
23
04-daemonset/daemonset-with-labels.yaml
Normal file
23
04-daemonset/daemonset-with-labels.yaml
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: DaemonSet
|
||||||
|
metadata:
|
||||||
|
name: nginx-daemonset
|
||||||
|
labels:
|
||||||
|
app: &app nginx
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
name: nginx-daemonset
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
name: nginx-daemonset
|
||||||
|
spec:
|
||||||
|
nodeSelector:
|
||||||
|
role: nginx
|
||||||
|
containers:
|
||||||
|
- image: nginx:1.28.2-alpine
|
||||||
|
name: nginx-daemonset
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
24
04-daemonset/daemonset-with-toleration.yaml
Normal file
24
04-daemonset/daemonset-with-toleration.yaml
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: DaemonSet
|
||||||
|
metadata:
|
||||||
|
name: nginx-daemonset
|
||||||
|
labels:
|
||||||
|
app: &app nginx
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
name: nginx-daemonset
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
name: nginx-daemonset
|
||||||
|
spec:
|
||||||
|
tolerations:
|
||||||
|
- key: node-role.kubernetes.io/control-plane
|
||||||
|
effect: NoSchedule
|
||||||
|
containers:
|
||||||
|
- image: nginx:1.28.2-alpine
|
||||||
|
name: nginx-daemonset
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
21
04-daemonset/daemonset.yaml
Normal file
21
04-daemonset/daemonset.yaml
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: DaemonSet
|
||||||
|
metadata:
|
||||||
|
name: nginx-daemonset
|
||||||
|
labels:
|
||||||
|
app: &app nginx
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
name: nginx-daemonset
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
name: nginx-daemonset
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: nginx:1.28.2-alpine
|
||||||
|
name: nginx-daemonset
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
Loading…
Add table
Add a link
Reference in a new issue