I using Kubernetes on Digitalocean and I have installed nginx-ingress which created an external load balancer. However when I install Sentry using helm https://github.com/helm/charts/tree/master/stable/sentry another load balancer was created. Oddly though sentry is only accessible through the nginx load balancer, i.e if I point my domain to the ip address of the load balancer created in the Sentry install it does load.
I new to kubernetes so pretty sure I've done something wrong when installing Sentry and assume it will relate to the values I used when installing the chart as it has a Service type of LoadBalancer.
So my question is can I get rid of the loadbalancer created by Sentry and what's the best way to do it with breaking anything.
# Name of the service and what port to expose on the pod
# Don't change these unless you know what you're doing
service:
name: sentry
type: LoadBalancer
externalPort: 9000
internalPort: 9000
## External IP addresses of service
## Default: nil
##
# externalIPs:
# - 192.168.0.1
## Configure ingress resource that allow you to access the
## Sentry installation. Set up the URL
## ref: http://kubernetes.io/docs/user-guide/ingress/
##
ingress:
enabled: true
hostname: sentry.mydomain.com
## Ingress annotations
##
annotations:
kubernetes.io/ingress.class: nginx
certmanager.k8s.io/cluster-issuer: letsencrypt-prod
## Ingress TLS configuration
## Secrets must be manually created in the namespace
##
tls:
- secretName: sentry-mydomain-crt
hosts:
- sentry.mydomain.com
Yes you can set the type of the service in the values file to ClusterIP.
The values file inside the chart defaults to LoadBalancer type (https://github.com/helm/charts/blob/master/stable/sentry/values.yaml) but you can override this by setting it to ClusterIP in your values file that you deploy with or by using '--set service.type=ClusterIP' as a parameter.
Then it will only be exposed through the Ingress and won't have an external LoadBalancer. See Ingress service type
Since you've already installed sentry you will want to find its release name (you'll see it as a prefix on the sentry resources from 'kubectl get' commands like 'kubectl get pod' or from 'helm list'). If you are using it then you'll want to do a 'helm upgrade'. If you aren't using it yet then you could do 'helm delete' on that release and install it again.
Use a ClusterIP service type instead of a LoadBalancer one:
service:
name: sentry
type: ClusterIP