Loadbalancer service in AWS EC2 instances without using AKS

Asking for help? Comment out what you need so we can get more information to help you!

Cluster information:

Kubernetes version: 1.16
Cloud being used: baremetal
Installation method: kubeadm
Host OS: Ubuntu
CNI and version:docker 1.8.06
CRI and version:

I have a two node EC2 instance in Amazon. I am not using Amazon kubernetes service. it’s just a kubeadm installation. I want to create a load balancer for one of the micro service. But the state of this service is in pending state and it’s not creating a load balancer. There are no kubernetes related logs in /var/log older. Journalctl logs are not showing anything. I have added the required tags for the subnet. Is it really possible to do this configuration? I went through the documentation in the “Service - Kubernetes” but doesn’t state if I have to use the cloud provider’s kubernetes service. Could some please clarify this?

Tags added to subnet:
kubernetes.io/role/internal-elb
kubernetes.io/cluster/ owned

apiVersion: v1
kind: Service
metadata:
  name: netappcrouinodeport
  annotations:
   service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0
  labels:
    app: ndas
    tier: frontend
spec:
  type: LoadBalancer
  ports:
  - port: 8082
    targetPort: 8082
  selector:
    app: ndas
    name: netappcro-pod
    tier: frontend

Yes, It is really possible :slight_smile:

Probably there was a flag missing specifying which cloud provider is being used. The kubelet and several components have a --cloud-provider flag that should be set to AWS for that to work.

Is it possible that currently the components don’t have it? Can you check that?

Thanks for confirming. I will add those flags and try it.