skip to Main Content

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

Answers


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

    Login or Signup to reply.
  2. 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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search