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
You can do a
kubectl describe service nlb-sample-service1 --namespace test
to checkout the service.You need to use load balancer type
external
along withinternal
scheme as shown below:For details, please refer to kubernetes doc