【文件属性】:
文件名称:k8s-netpol:Calico的Kubernetes网络策略
文件大小:15KB
文件格式:ZIP
更新时间:2021-03-30 04:15:43
Go
Kubernets网络策略
问题
许多人认为名称空间提供了网络隔离,但事实并非如此。 尝试这个:
# Create a dev namespace
kubectl create ns dev
# Create a pod and a services
kubectl run nginx --image=nginx:alpine --restart=Never --port=80 --expose -n dev
# Access the service from a differente namespace
kubectl run busybox --image=busybox -it --restart=Never --rm -- /bin/sh -n default
# Cannot accesss the pod from the default namespace
wget -O-
【文件预览】:
k8s-netpol-main
----createcluster.sh(248B)
----images()
--------NetPolTrafficFlow.png(10KB)
--------README.md(1B)
----allowtofrontend.yaml(191B)
----test.sh(292B)
----netpol()
--------README.md(1B)
----allowfrontoapi.yaml(228B)
----kind.yaml(174B)
----README.md(6KB)
----create.sh(451B)
----httpserver()
--------Dockerfile(209B)
--------main.go(1KB)
--------README.md(342B)
----denyall.yaml(130B)
----allowapitodb.yaml(216B)
----tcpserver()
--------go.mod(27B)