Requirement:
OKE(Oracle Kubernetes Engine) has well integration with OCI load balancer . We are going to create a private load balancer in OKE . Default a public load balancer is created with public address.
Solution:
We add some annoations in the metadata to address that. The full list of annotations could be found in
github oracle oci clould controller manager load balancer section
apiVersion: v1
kind: Service
metadata:
annotations:
service.beta.kubernetes.io/oci-load-balancer-shape: 100Mbps
service.beta.kubernetes.io/oci-load-balancer-internal: true
1 comment:
Hello,
did this work for you? i tried adding the annotation to my service but the load balancer generated is always public
apiVersion: v1
kind: Service
metadata:
name: my-nginx-svc
labels:
app: nginx
annotations:
service.beta.kubernetes.io/oci-load-balancer-internal: true
spec:
type: LoadBalancer
ports:
- port: 80
selector:
app: nginx
devkube@ubuntu-2gb-nbg1-1:~/git/kubernetes/traefik$ kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
my-nginx-svc LoadBalancer 172.254.25.42 130.61.64.231 80:32160/TCP 96s
Post a Comment