From 50a8876e656879a2afdb2f503cb7a11688ecacdf Mon Sep 17 00:00:00 2001 From: sandervanvugt Date: Wed, 30 Nov 2022 10:52:54 -0800 Subject: [PATCH] message --- nwp-lab9-1.yaml | 29 +++++++++++++++++++++++++++++ nwp-lab9-2.yaml | 11 +++++++++++ taint-toleration.yaml | 2 +- taint-toleration2.yaml | 2 +- 4 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 nwp-lab9-1.yaml create mode 100644 nwp-lab9-2.yaml 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"