ahmetb / kubernetes-network-policy-recipes

Example recipes for Kubernetes Network Policies that you can just copy paste

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Network Policy on Plain Vanilla 1.18.4.

raviseerapu opened this issue · comments

commented

READ BEFORE YOU CREATE AN ISSUE:
This issue tracker is specifically about the recipes listed in this repository.
If you want to ask a general question about network policies or advice, DO NOT
ask them here. Instead ask them on:


I'm applying the same POD network security policy on Plain Vanilla 1.18.4 release with WeaveNet-2.6.5.

ubuntu@k8s-um01:~$ kubectl get pods
NAME READY STATUS RESTARTS AGE
web 1/1 Running 0 3h40m

ubuntu@k8s-um01:~$ kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.96.0.1 443/TCP 4h4m
web ClusterIP 10.97.61.57 80/TCP 3h40m

ubuntu@k8s-um01:~$ kubectl get networkpolicy
NAME POD-SELECTOR AGE
web-deny-all app=web 3h39m

ubuntu@k8s-um01:~$ kubectl run --generator=run-pod/v1 --rm -i -t --image=alpine test-$RANDOM -- sh
Flag --generator has been deprecated, has no effect and will be removed in the future.
If you don't see a command prompt, try pressing enter.
/ # wget -qO- http://web

<title>Welcome to nginx!</title> <style> body { width: 35em; margin: 0 auto; font-family: Tahoma, Verdana, Arial, sans-serif; } </style>

Welcome to nginx!

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.

Thank you for using nginx.

Any suggestions where we are doing mistakes.

Can you please ask this on Stackoverflow.com?