Valid CKS Dumps shared by ExamDiscuss.com for Helping Passing CKS Exam! ExamDiscuss.com now offer the newest CKS exam dumps, the ExamDiscuss.com CKS exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com CKS dumps with Test Engine here:
Create a network policy named allow-np, that allows pod in the namespace staging to connect to port 80 of other pods in the same namespace. Ensure that Network Policy:- 1. Does not allow access to pod not listening on port 80. 2. Does not allow access from Pods, not in namespace staging.
Correct Answer:
apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: network-policy spec: podSelector: {} #selects all the pods in the namespace deployed policyTypes: - Ingress ingress: - ports: #in input traffic allowed only through 80 port only - protocol: TCP port: 80