NGINX service configuration options

The default Turbonomic configuration performs the following operations:

  • Sets up an NGINX deployment in the Turbonomic namespace

  • Creates the nginx service with a type of LoadBalancer and an externalTrafficPolicy of Local

  • Attempts to get a public external IP

You have several options to define the routing logic defined in the nginx service. You also have the flexibility to define an ingress/route to Turbonomic or annotate load balancer configurations.

Option 1: NGINX as a proxy and 'bring your own' ingress/route

You can configure NGINX as a ClusterIP type service, which allows you to use your own ingress/route while maintaining the Turbonomic internal routing rules and leverage NGINX as a proxy. This is required to leverage reporting on your Turbonomic instance with your own ingress/route. You will use the parameter nginxIsPrimaryIngress set to false.

kind: XL
metadata:
    name: xl-releasespec:
    nginx:
      nginxIsPrimaryIngress: false
#use openshiftingress and nginxingress if you would like Turbo to create a single route that will point to the nginx service
#openshiftingress:
#  enabled: true
#nginxingress:
#  enabled: true
Note:

You do not need this configuration if you are running reporting with the Turbonomic provided NGINX service as the ingress.

To create your own ingress, see Platform provided ingress and Red Hat OpenShift routes and Ingress minimum requirements.

Option 2: NGINX as a LoadBalancer service type and customized annotations

Turbonomic does not deploy an ingress controller. It deploys NGINX as a Kubernetes service, which can create a cloud provider load balancer. This load balancer has a type of external or can be used as an internal clusterIP service type that sits behind a customer/platform provided ingress.

It is assumed that you understand the following concepts:

  • The types of load balancers that are available to you based on your cloud or infrastructure provider

  • All service annotations that are available to you and which annotations are required for your environment

To modify the NGINX load balancer type service to use an internal IP address on your load balancer, use the required annotation according to your Kubernetes platform and version. Use an annotation that is applicable for your environment.

In the Turbonomic Custom Resource, you can specify the proper annotations that you determined are required for the load balancer for your NGINX service.

global: 
    ingress:
      annotations:
        #provide the correct annotations based on the LB you want and the properties you want.

Option 3: NGINX external traffic policy

In some environments where you are using the nginx service as your ingress with a type of LoadBalancer, you may want to change the externalTrafficPolicy from the default of Local to a different value, such as cluster. Add the following parameter after nginx and remember to combine with any other parameters that you may have defined.

spec:
   global:
     ingress:
       annotations:
   nginx:
     externalTrafficPolicy: Cluster