This topic describes how to use an Ingress to enable external access to an application that is deployed on a virtual node of a cluster of Container Service for Kubernetes (ACK). This allows you to provide the application with scalable and unlimited computing capacity without the need to create new nodes in the ACK cluster. This also meets the elasticity requirements of your business during peak hours and off-peak hours.
Prerequisites
A virtual node is deployed in your ACK cluster. For more information, see Deploy ack-virtual-node in an ACK cluster.
The virtual-node-affinity-injection: enabled label is attached to the namespace where the application pods are deployed. For more information, see Create pods in a namespace with specified labels.
Procedure
Verify the results
- Go to the Workload page and click the Deployments tab. On the Deployments tab, you can find the newly created Deployments that are
named coffee and tea.
- Go to the Workload page and click the Pods tab. On the Pods tab, you can find that all pods of the created Deployments run on
the virtual-kubelet node.
- In the left-side navigation pane of the details page of the cluster, click Ingresses. On the Ingresses page, you can find the newly created Ingress.
- To check whether the created Ingress can be accessed, run the following commands:
kubectl -n vk get ing
curl -H "Host:cafe.example.com" <EXTERNAL_IP>/tea
curl -H "Host:cafe.example.com" <EXTERNAL_IP>/coffee