I have installed kubernetes using minikube on a single node. I have implemented ‘LoadBalancer’ type of service which manages 3 pods. By default, it uses a ‘network load balancer’. Can we change load balancer type in service .yaml file or can we change load balancer algorithm used? please find the service file below :
— myservice.yaml
apiVersion: v1
kind: Service
metadata:
name: demo-apps-lb
spec:
type: LoadBalancer
ports:
port: 80
selector:
app: app1
Note : Here I am not using any cloud platform, all the things are on single host machine.
Nodeport
type to expose your service on a specific port. The port should be in between 30000-32676 ports. After using nodeport service type you would be able to access your service at http://<vm_ip>:<node_port> – Prafull Ladha Feb 5 '19 at 6:53