The CCM provides two methods for securing NodeBalancers with firewalls:
firewall-acl
annotation)firewall-id
annotation)Use the firewall-acl
annotation to specify firewall rules. The rules should be provided as a JSON object with either an allowList
or denyList
(but not both).
apiVersion: v1
kind: Service
metadata:
name: restricted-service
annotations:
service.beta.kubernetes.io/linode-loadbalancer-firewall-acl: |
{
"allowList": {
"ipv4": ["192.168.0.0/16", "10.0.0.0/8"],
"ipv6": ["2001:db8::/32"]
}
}
metadata:
annotations:
service.beta.kubernetes.io/linode-loadbalancer-firewall-acl: |
{
"denyList": {
"ipv4": ["203.0.113.0/24"],
"ipv6": ["2001:db8:1234::/48"]
}
}
firewall-id
annotation:metadata:
annotations:
service.beta.kubernetes.io/linode-loadbalancer-firewall-id: "12345"
Rule Management
IP Range Planning
For more information: