1

aws-load-balancer-scheme: internal does not create an NLB, no error, it just never creates the NLB

If I use the deprecated service.beta.kubernetes.io/aws-load-balancer-internal: "true", it works fine.

However, the annotation documentation says to use scheme instead.

Here is my full code:

apiVersion: v1
kind: Service
metadata:
  name: nlb-sample-service1
  namespace: test
  annotations:
    service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: instance
    service.beta.kubernetes.io/aws-load-balancer-scheme: internal
    service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
    service.beta.kubernetes.io/aws-load-balancer-type: nlb

spec:
  ports:
    - port: 80
      targetPort: 80
      protocol: TCP
  type: LoadBalancer
  selector:
    app: nginx

I've tried a number of different variations of that, nothing I tried works when scheme is used.

What am I missing here?

Is there any way to get an error? kubectl create -f service-file.yaml runs without any errors to stdout.

Thanks in advance.

2 Answers2

3

You need to use load balancer type external along with internal scheme as shown below:

service.beta.kubernetes.io/aws-load-balancer-type: external
service.beta.kubernetes.io/aws-load-balancer-scheme: internal

For details, please refer to kubernetes doc

Randhir
  • 792
  • 7
  • 18
0

You can do a kubectl describe service nlb-sample-service1 --namespace test to checkout the service.

gohm'c
  • 13,492
  • 1
  • 9
  • 16