Coder Social home page Coder Social logo

Comments (3)

clementnuss avatar clementnuss commented on July 29, 2024

hi @jcpunk

I had a quick look, and I am not too sure what the network policy should look like.

it seems whitelisting the apiserver for egress traffic isn't as simple as expected: cilium/cilium#20550

(seems to require specifying the CIDR of the API server IP)

I've also checked another controller (OPA Gatekeeper) to see how they do it:
https://github.com/open-policy-agent/gatekeeper/blob/b7230e0bdc3479b867acd2fd0d7192b1182c59d4/charts/gatekeeper/templates/gatekeeper-controller-manager-network-policy.yaml#L4

they only have an optional NetPol that restricts what can enter the pod, nothing for egress.

How would you see it in our case ?

from kubelet-csr-approver.

jcpunk avatar jcpunk commented on July 29, 2024

Alas, I don't know enough about what it needs networking wise...

perhaps something like:

  egress:
  - to:
    - namespaceSelector:
        matchLabels:
          name: kube-system
    ports:
    - protocol: UDP
      port: 53
    - protocol: TCP
      port: 53
    - port: 443
      protocol: TCP

from kubelet-csr-approver.

clementnuss avatar clementnuss commented on July 29, 2024

I think this type of network policy would more need to be enforced by the cluster operator.

also, typically the kube-apiserver pods run in hostNetwork mode, and are not covered by network policies, except when you use direct IP address.

That is not however something we can do for this project.

and regarding ingress netpol, here the only endpoint to cover is the /metrics, and again I think this could more be covered by the cluster operator, the security "risk" associated with that endpoint is not worth implementing a default netpol IMO.

therefore closing this issue :)

from kubelet-csr-approver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.