I've got a service running in an on premise k8s environment. It is basically an nginx image, and a call takes like 10 seconds. replicas is two and of course two pods are running. But almost if not every call goes to one pod, queueing up calls. If there's many calls they just wait until all of them are ready, not a single one goes to the other pod.
apiVersion: v1 kind: Service metadata: name: revproxy-svc spec: selector: role: app ports: - protocol: TCP port: 80 targetPort: 80 nodePort: 32001 type: LoadBalancer externalName: my.domain.nl --- apiVersion: apps/v1 kind: Deployment metadata: name: proxy-deployment labels: role: app spec: replicas: 2 selector: matchLabels: role: app template: metadata: labels: role: app spec: containers: - name: web image: "10.203.32.90:5000/myproxy" resources: requests: cpu: 500m env: - name: NODE_IP valueFrom: fieldRef: fieldPath: status.hostIP imagePullPolicy: Always
What do we need to config to set up proper loadbalancing?