Completed upto lesson 28
This commit is contained in:
0
answers/lesson-3.partial-empty-copy.yaml
Normal file
0
answers/lesson-3.partial-empty-copy.yaml
Normal file
6
answers/lesson-3.yaml
Normal file
6
answers/lesson-3.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
#Timed Task
|
||||
# command
|
||||
kubeclt create role reporter-role --namespace=cks-rbac --verbs="get,list" --resources="configmaps" --dry-run=client -o yaml
|
||||
|
||||
kubectl create rolebinding reporter-rolebinding --namespace=cks-rbac --serviceaccount=cks-rbac:report-reader --role=reporter-role --dry-run=client -o yaml
|
||||
|
||||
29
answers/network-policy.yaml
Normal file
29
answers/network-policy.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: app-control
|
||||
namespace: database
|
||||
spec:
|
||||
policyTypes:
|
||||
- Ingress
|
||||
- Egress
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app: db
|
||||
ingress:
|
||||
- from:
|
||||
- nameSpaceSelector:
|
||||
matchLabels:
|
||||
kubernetes.io/metadata: payments
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app: payments
|
||||
ports:
|
||||
- port: 5432
|
||||
protocol: TCP
|
||||
egress:
|
||||
- ports:
|
||||
- protocol: TCP
|
||||
port: 53
|
||||
- protocol: UDP
|
||||
port: 53
|
||||
Reference in New Issue
Block a user