While components of your application can communicate with each other by service names using the internal network, external connections require additional configurations.
The most basic way to establish an external connection to a service is to expose it via NodePort directly. As the name implies, this type of service opens a specific port on the nodes, any traffic sent to this port is forwarded to your service. By default, the nodePort for your service is selected randomly from the 30000-32767 range.
Note: This method has several downsides that should be considered when configuring the Kubernetes Cluster (one service per port, restricted range of ports, etc). As a result, the NodePort service type can be used for the demo or other temporary applications. However, the production solutions usually require more permanent external access (e.g. ingresses).
1. Here is an example of the NodePort type service configuration:
- port: 80
Note: Be aware, CirrusGrid PaaS does not support the LocaBalancer service type currently. If applying YAML or Helm charts with such a service object, you need to convert it into NodePort or create ingresses for external access.
2. If needed, a particular nodePort can be selected for your service. For example, the following code can be used to configure a redirect from the 30984 port:
- port: 80
Note: Manually provided nodePort value should be from the allowed range (30000-32767) and unique (to prevent collision with other services).
3. In case public IP is attached to the Kubernetes worker nodes, no additional actions are required.
Otherwise, the obtained port should be exposed from the CirrusGrid side. Navigate to the Kubernetes environment Settings > Endpoints and click Add. In the opened frame, provide the following data:
Click Add to confirm. It may take up to a few minutes for CirrusGrid to expose a port and redirect requests to the NodePort service.
Powered by BetterDocs
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.