|
3 | 3 | This file defines a list of [Service][4] `type: LoadBalancer` annotations which are
|
4 | 4 | supported by the `oci-cloud-controller-manager`.
|
5 | 5 |
|
6 |
| -All annotations are prefixed with `service.beta.kubernetes.io/` or `oci.oraclecloud.com/`. For example: |
| 6 | +All annotations are prefixed with `service.beta.kubernetes.io/` or `oci.oraclecloud.com/` or `oci-network-load-balancer.oraclecloud.com/` (for OCI Network Load Balancer specific annotations). For example: |
7 | 7 |
|
8 | 8 | ```yaml
|
9 | 9 | kind: Service
|
10 | 10 | apiVersion: v1
|
11 | 11 | metadata:
|
12 | 12 | name: nginx-service
|
13 | 13 | annotations:
|
| 14 | + oci.oraclecloud.com/load-balancer-type: "lb" |
14 | 15 | service.beta.kubernetes.io/oci-load-balancer-shape: "400Mbps"
|
15 | 16 | service.beta.kubernetes.io/oci-load-balancer-subnet1: "ocid..."
|
16 | 17 | service.beta.kubernetes.io/oci-load-balancer-subnet2: "ocid..."
|
|
58 | 59 | - If an invalid mode is passed in the annotation, then the default (`"All"`) mode is configured.
|
59 | 60 | - If an annotation is not specified, the mode specified in the cloud provider config file is configured.
|
60 | 61 |
|
| 62 | +## Network Load Balancer |
| 63 | + |
| 64 | +For example: |
| 65 | + |
| 66 | +```yaml |
| 67 | +apiVersion: v1 |
| 68 | +kind: Service |
| 69 | +metadata: |
| 70 | + name: example-nlb |
| 71 | + annotations: |
| 72 | + oci-network-load-balancer.oraclecloud.com/security-list-management-mode: "All" |
| 73 | + oci.oraclecloud.com/load-balancer-type: nlb |
| 74 | +spec: |
| 75 | + selector: |
| 76 | + app: example-nlb |
| 77 | + ports: |
| 78 | + - port: 8088 |
| 79 | + targetPort: 80 |
| 80 | + type: LoadBalancer |
| 81 | + externalTrafficPolicy: Local |
| 82 | +``` |
| 83 | + |
| 84 | +Note: |
| 85 | +- The only security list management mode allowed when backend protocol is UDP is "None" |
| 86 | +- `externalTrafficPolicy` should be "Local" for preserving source IP |
| 87 | +- We recommend to set the `security-list-management-mode` as "None" and configure NSG / Security rules on your own. |
| 88 | + |
| 89 | +## Network Load Balancer Specific Annotations |
| 90 | + |
| 91 | +| Name | Description | Default |
| 92 | +| ----- | ----------- | ------- |
| 93 | +| `oci-network-load-balancer.oraclecloud.com/internal` | Create an [internal network load balancer][1]. Cannot be modified after load balancer creation. | `false` |
| 94 | +| `oci-network-load-balancer.oraclecloud.com/subnet` | The OCID of the required regional or AD specific subnet to attach the network load balancer. | Value set for the cluster |
| 95 | +| `oci-network-load-balancer.oraclecloud.com/oci-network-security-groups` | Specifies Network Security Groups' OCIDs to be associated with the network load balancer. | `""` |
| 96 | +| `oci-network-load-balancer.oraclecloud.com/initial-freeform-tags-override` | Specifies one or multiple Freeform tags to apply to the OCI Network Load Balancer. | `""` |
| 97 | +| `oci-network-load-balancer.oraclecloud.com/initial-defined-tags-override` | Specifies one or multiple Defined tags to apply to the OCI Network Load Balancer. | `""` |
| 98 | +| `oci-network-load-balancer.oraclecloud.com/health-check-retries` | The number of retries to attempt before a backend server is considered "unhealthy". | `3` |
| 99 | +| `oci-network-load-balancer.oraclecloud.com/health-check-timeout` | The maximum time, in milliseconds, to wait for a reply to a health check. A health check is successful only if a reply returns within this timeout period. | `3000 ms` |
| 100 | +| `oci-network-load-balancer.oraclecloud.com/health-check-interval` | The interval between health checks requests, in milliseconds. | `3000 ms` |
| 101 | +| `oci-network-load-balancer.oraclecloud.com/backend-policy` | The network load balancer policy for the backend set. Valid values: "TWO_TUPLE", "THREE_TUPLE", or "FIVE_TUPLE" | `"FIVE_TUPLE"` |
| 102 | +| `oci-network-load-balancer.oraclecloud.com/security-list-management-mode` | Specifies the security list mode ("All", "Frontend","None") to configure how security lists are managed. | `"None"` |
| 103 | + |
| 104 | + |
61 | 105 | [1]: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
|
62 | 106 | [2]: https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Tasks/managingVCNs.htm
|
63 | 107 | [3]: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls
|
|
0 commit comments