Currently testing out Kubernetes 1.0.7 on AWS and it creates an external load balancer just fine but I want to know if its possible to create an internal load balancer that is only accessible within the internal subnet.
Internal ELBs are supported, at least as of Kubernetes version 1.2
.
Per this thread, apply annotation services.beta.kubernetes.io/aws-load-balancer-internal
to the service definition.
kind: Service
apiVersion: v1
metadata:
name: someService
annotations:
- name: services.beta.kubernetes.io/aws-load-balancer-internal
value: 0.0.0.0/0
As Prashanth mentioned no builtin support at the moment but I did the following which works out just fine. Created service type NodePort and manually created the loadbalancer as an internal lb and forwarded traffic to the nodes on the nodeport specified.
Not out of the box (at the time of this writing), but the Kubernetes Ingress api is evolving to support internal loadbalancers. Note the following:
[1] https://github.com/kubernetes/contrib/tree/master/service-loadbalancer
[2] https://github.com/kubernetes/contrib/blob/master/service-loadbalancer/rc.yaml#L35