title: Kubernetes service - Loadbalancer with HTTPS
body: <p>I am using kubernetes with service as ClusterIP and placing ingress in front of the service to expose this to outside the Kubernetes cluster.</p>
  
  <p>Running ingress with https and to make it https, I created the secret and using the same in ingress.</p>
  
  <blockquote>
    <p>kubectl create secret tls test-secret --key key --cert cert</p>
  </blockquote>
  
  <p>Using netscalar in our kubernetes cluster and hence, I am able to use X-Forward-For, Session affinity, Load balancing algoritms along with ingress.</p>
  
  <p>Now, trying to make the service type as LoadBalancer so that I dont have to have ingress.  I know, service type loadbalancer provides L4-loadbalancer and hence there wont be session affinity feature in the load balancer. Since, it is ok for few services, I am trying to use this.</p>
  
  <p>Trying to make the service HTTPS and I came across,</p>
  
  <blockquote>
    <p><a href="https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/#securing-the-service" rel="noreferrer">https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/#securing-the-service</a></p>
  </blockquote>
  
  <p>Here, we create tls secret and using the reference in the deployment section and not in the service section. Not sure how it works. Also, When i use <a href="https://servicename.namespace.svc.XXXXX.com" rel="noreferrer">https://servicename.namespace.svc.XXXXX.com</a> in the browser getting the cert error.</p>
  
  <p>My application is running as https and it needs keystore and truststore in a property file like,</p>
  
  <p>ssl.trustore=PATH_TO_THE_FILE
  ssl.keystore=PATH_TO_THE_FILE</p>
  
  <p>I am confused, How can i make the service type loadbalancer https?</p>