Skip to content

CCM LoadBalancer - K8s service type LoadBalancer isn't enforcing Spec.loadBalancerSourceRanges #499

@cunningr-cisco

Description

@cunningr-cisco

I am unable to make the loadBalancerSourceRanges work as I expected with the LoadBalancer controller. I have the following service:

---
apiVersion: v1
kind: Service
metadata:
  name: echoserver
  annotations:
    oci.oraclecloud.com/load-balancer-type: "nlb"
    oci.oraclecloud.com/ingress-ip-mode: "proxy"
    oci-network-load-balancer.oraclecloud.com/security-list-management-mode: "Frontend"
spec:
  selector:
    app: echoserver
  loadBalancerSourceRanges:
  - 10.0.0.0/24
  ports:
    - port: 80
      targetPort: 8080
      protocol: TCP
      name: http
    - port: 443
      targetPort: 8443
      protocol: TCP
      name: https
  type: LoadBalancer 

As this is a public load balancer I expected that setting the source range to 10.0.0.0/24 would prevent me from accessing the service over the public Internet from my source IP, but it does not - I can still access my echo-server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions