cloudfoundry-incubator / kubo-deployment

Contains manifests used to deploy Cloud Foundry Container Runtime
https://www.cloudfoundry.org/container-runtime/
Apache License 2.0
275 stars 114 forks source link

Network policy not working #378

Closed rauizab closed 5 years ago

rauizab commented 5 years ago

What happened: Trying to apply network policies in kubo-deployment v0.27.0 and v0.28.0. I followed these examples https://kubernetes.io/docs/tasks/administer-cluster/declare-network-policy/

What you expected to happen: Pods do not have connectivity to other pods

How to reproduce it (as minimally and precisely as possible): Deploy kubo v0.28.0 in openstack. Follow https://kubernetes.io/docs/tasks/administer-cluster/declare-network-policy/ example. With the policy created the pod is still able to access the target pod.

Anything else we need to know?: I am using bosh-dns as an addon. Otherwise I have connectivity problems and the deployment fails without it. Ops files used:

bosh int manifests/cfcr.yml \
  -o manifests/ops-files/misc/single-master.yml \
  -o manifests/ops-files/add-hostname-to-master-certificate.yml \
  -o manifests/ops-files/allow-privileged-containers.yml \
  -o manifests/ops-files/rename.yml \
  -o manifests/ops-files/misc/local-config-server.yml \
  -o manifests/ops-files/vm-types.yml \
  -o manifests/ops-files/worker_count.yml \

Environment:

tvs commented 5 years ago

Hi @rauizab,

CFCR ships with Flannel as the network provider, which doesn't support network policies. As mentioned in the docs, you'd need to configure Kubernetes to use something like Calico, but that would have to happen through your own effort for now. We've had a few discussions about figuring out how we can make the network providers more pluggable, but nothing that has really taken hold so far.