Manage Nginx Ingress Controller instances

Kubernetes uses the kube-proxy service to enable service release and load balancing at the transport layer. To meet the demands for granular policies, flexibility and high forwarding performance, Kubernetes introduces the resource object Ingress to give services externally-reachable URLs, load balance traffic, terminate SSL, and expose HTTP routes from outside a cluster to services within the cluster at the application layer.

Kubernetes releases the Nginx Ingress Controller to offers Ingresses. The nginx-ingress plugin uses ConfigMaps to save Nginx configuration. The Nginx Ingress Controller generates an Nginx configuration segment for each Ingress, writes the configuration segment to the Nginx Pods through Kubernetes APIs, and reload the Pods to renew the Nginx configuration segment.

The nginx-ingress plugin uses community templates and images.

Nginx Ingress Controller instance management contains the following tasks:

Create an Nginx Ingress Controller instance

  1. On the top navigation bar, click Cloud Services, and then select Cloud Container Engine from the Container Service menu.

  1. From the left navigation pane, select Clusters.

  1. Click the name of a cluster.

  1. Click the Plugin Management tab.

  1. Click Install for the ingress-nginx plugin.

  1. Configure the installation parameters.

Table-1 Configuring the installation parameters

Parameter

Description

Name

Enter a name for the Nginx Ingress Controller instance.

Namespace

Select a namespace not in use by applications. As a best practice, click Create Namespace to create a dedicated namespace. For more information, see "Create a namespace."

Version

Select a version, which can only be v0.49.3.

Instance Type

Select an instance type.

  • If you select the Deployment type, you can deploy multiple Ingress Controller instances with different names.

  • If you select the Daemonset type, you can deploy only one Ingress Controller instance. If a Daemonset Ingress Controller instance already exists, you must first delete it to deploy a new instance. For more information, see "Delete an Nginx Ingress Controller instance."

If you have deployed a Daemonset instance for the ingress-nginx 0.30.0 plugin, verify that the instance is not in use and delete it. Then, deploy a Daemonset instance for the ingress-nginx 0.49.3 plugin.

Instance Quantity

Specify the number of Pods. This parameter is available for the Deployment type.

You can create multiple Pods for a Deployment instance and one Pod for a Daemonset instance.

Container Settings

Specify the startup and running limits for the Ingress Controller containers.

  • CPU Requests: Enter an integer or a number with one decimal place larger than 0. This value cannot be larger than the value for the CPU limits.

  • Memory Requests: Enter an integer. This value cannot be larger than the value for the memory limits.

  • CPU Limits: Enter an integer or a number with one decimal place larger than 0. This value cannot be smaller than the value for the CPU requests.

  • Memory Limits: Enter an integer. This value cannot be smaller than the value for the memory requests. As a best practice, set this value to  800 MB or larger.

Controller Label

Specify a label for the controller. You can use controller labels to facilitate controller management.

Access Method

Specify an access method. Options include NodePort and LoadBalancer.

Service Port (HTTP)

This parameter is available only when the access method is NodePort.

  • For the Deployment type, enter a port number used for accessing a service.

  • For the Daemonset type, enter the host port number used by the container. The default port number is 80.

Service Port (HTTPS)

This parameter is available only when the access method is NodePort.

  • For the Deployment type, enter a port number used for accessing a service.

  • For the Daemonset type, enter the host port number used by the container. The default port number is 443.

Port Mappings

This parameter is available only when the access method is LoadBalancer.

When you configure port mappings, the protocol must be the same for port mirroring and you must specify corresponding port numbers.

Parameters

This parameter is available only when the access method is LoadBalancer.

The system automatically determines the type of the north-south LB and the tenant ID of the LB.

You must manually configure the ID of the subnet to which the LB belongs and the LB IP.

 

  1. Click OK. The Ingress Controller instance appears in the plugin instance list.

View detailed information about an Nginx Ingress Controller instance

Perform this task to view the namespace, version, access address, creation time, description, container flavor, and other information about an Nginx Ingress Controller instance.

  1. On the top navigation bar, click Cloud Services, and then select Cloud Container Engine from the Container Service menu.

  1. From the left navigation pane, select Clusters.

  1. Click the name of a cluster.

  1. Click the Plugin Management tab.

  1. Select Plugin Instance.

  1. Click the name of an instance.

Edit an Nginx Ingress Controller instance

  1. On the top navigation bar, click Cloud Services, and then select Cloud Container Engine from the Container Service menu.

  1. From the left navigation pane, select Clusters.

  1. Click the name of a cluster.

  1. Click the Plugin Management tab, and then select Plugin Instance.

  1. Click Edit in the Actions column for the target instance.

  1. Configure the instance parameters as needed.

  1. Click OK.

Use an Nginx Ingress Controller instance

After applications are deployed in a container, you can configure an application domain name for an application to create Ingresses and specify an Nginx Ingress Controller instance to provide the Ingresses. For more information about configuring an application domain name, see "Create an application from the application list."

You can perform this task only for an application deployed from a container image in an exclusive cluster.

 

  1. On the top navigation bar, click Business Apps.

  1. From the left navigation pane, select App Management > Application.

  1. Click the name of an application.

  1. Click the Access tab.

  1. Click Application Domain Name, and then click Add.

  1. Enter an application domain name, and select an Nginx Ingress Controller instance deployed in the cluster that contains the application.

  1. Click OK.

Delete an Nginx Ingress Controller instance

You cannot delete an Nginx Ingress Controller instance if it has Ingress resources in use.

  1. On the top navigation bar, click Cloud Services, and then select Cloud Container Engine from the Container Service menu.

  1. From the left navigation pane, select Clusters.

  1. Click the name of a cluster.

  1. Click the Plugin Management tab.

  1. Select Plugin Instance.

  1. Click Delete in the Actions column for an instance.

  1. Click OK.