diff --git a/nwp-lab9-1.yaml b/nwp-lab9-1.yaml new file mode 100644 index 0000000..0463740 --- /dev/null +++ b/nwp-lab9-1.yaml @@ -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" diff --git a/nwp-lab9-2.yaml b/nwp-lab9-2.yaml new file mode 100644 index 0000000..5d07a4e --- /dev/null +++ b/nwp-lab9-2.yaml @@ -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: {} diff --git a/taint-toleration.yaml b/taint-toleration.yaml index 88c2235..fec7afb 100644 --- a/taint-toleration.yaml +++ b/taint-toleration.yaml @@ -11,6 +11,6 @@ spec: imagePullPolicy: IfNotPresent tolerations: - key: "storage" - operator: "Equals" + operator: "Equal" value: "ssd" effect: "NoSchedule" diff --git a/taint-toleration2.yaml b/taint-toleration2.yaml index b36ffe6..63aa25e 100644 --- a/taint-toleration2.yaml +++ b/taint-toleration2.yaml @@ -11,6 +11,6 @@ spec: imagePullPolicy: IfNotPresent tolerations: - key: "storage" - operator: "Equals" + operator: "Equal" value: "hdd" effect: "NoSchedule"