message
This commit is contained in:
parent
5114697963
commit
50a8876e65
29
nwp-lab9-1.yaml
Normal file
29
nwp-lab9-1.yaml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: nwp-nginx
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
app: nwp-nginx
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: nwp-nginx
|
||||||
|
image: nginx:1.17
|
||||||
|
...
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: nwp-busybox
|
||||||
|
namespace: nwp-namespace
|
||||||
|
labels:
|
||||||
|
app: sleepy
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: nwp-busybox
|
||||||
|
image: busybox
|
||||||
|
command:
|
||||||
|
- sleep
|
||||||
|
- "3600"
|
||||||
11
nwp-lab9-2.yaml
Normal file
11
nwp-lab9-2.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
kind: NetworkPolicy
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
namespace: default
|
||||||
|
name: deny-from-other-namespaces
|
||||||
|
spec:
|
||||||
|
podSelector:
|
||||||
|
matchLabels:
|
||||||
|
ingress:
|
||||||
|
- from:
|
||||||
|
- podSelector: {}
|
||||||
@ -11,6 +11,6 @@ spec:
|
|||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
tolerations:
|
tolerations:
|
||||||
- key: "storage"
|
- key: "storage"
|
||||||
operator: "Equals"
|
operator: "Equal"
|
||||||
value: "ssd"
|
value: "ssd"
|
||||||
effect: "NoSchedule"
|
effect: "NoSchedule"
|
||||||
|
|||||||
@ -11,6 +11,6 @@ spec:
|
|||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
tolerations:
|
tolerations:
|
||||||
- key: "storage"
|
- key: "storage"
|
||||||
operator: "Equals"
|
operator: "Equal"
|
||||||
value: "hdd"
|
value: "hdd"
|
||||||
effect: "NoSchedule"
|
effect: "NoSchedule"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user