Reputation: 166
I am defining a kubernetes service like this:
kind: Service
apiVersion: v1
metadata:
name: de-identity-svc
labels:
app: api-identity
environment: de
product: api
annotations:
service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags: "app=api-identity,environment=de,product=api"
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http
service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0
service.beta.kubernetes.io/aws-load-balancer-type: nlb
spec:
type: LoadBalancer
selector:
app: api-identity
environment: de
ports:
- port: 80
protocol: TCP
However, when the load balancer is created in AWS, it is created with type Classic
instead of the expected network
.
The kubernetes version info is this:
Client Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.4", GitCommit:"9befc2b8928a9426501d3bf62f72849d5cbcd5a3", GitTreeState:"clean", BuildDate:"2017-11-20T05:28:34Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.11", GitCommit:"b13f2fd682d56eab7a6a2b5a1cab1a3d2c8bdd55", GitTreeState:"clean", BuildDate:"2017-11-25T17:51:39Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
As @vdMeent notes, this feature was added in Kubernetes 1.9 (https://aws.amazon.com/blogs/opensource/network-load-balancer-support-in-kubernetes-1-9/)
Upvotes: 1
Views: 410
Reputation: 56
You should upgrade your server Kubernetes version to 1.9 or above, as NLB is only available for Kubernetes 1.9 and up. Please note that NLB is still in alpha, so you shouldn't use it for anything substantial like production environments.
Upvotes: 2