mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-05-05 00:16:39 +00:00
kubectl run is being deprecated as a multi-purpose tool. This PR replaces 'kubectl run' with 'kubectl create deployment' in most places (except in the very first example, to reduce the cognitive load; and when we really want a single-shot container). It also updates the places where we use a 'run' label, since 'kubectl create deployment' uses the 'app' label instead. NOTE: this hasn't gone through end-to-end testing yet.
23 lines
346 B
YAML
23 lines
346 B
YAML
kind: NetworkPolicy
|
|
apiVersion: networking.k8s.io/v1
|
|
metadata:
|
|
name: deny-from-other-namespaces
|
|
spec:
|
|
podSelector:
|
|
matchLabels:
|
|
ingress:
|
|
- from:
|
|
- podSelector: {}
|
|
---
|
|
kind: NetworkPolicy
|
|
apiVersion: networking.k8s.io/v1
|
|
metadata:
|
|
name: allow-webui
|
|
spec:
|
|
podSelector:
|
|
matchLabels:
|
|
app: webui
|
|
ingress:
|
|
- from: []
|
|
|