Internal Networking
Kubernetes Cluster: Internal Networking
Automated Pod Networking
The Kubernetes Cluster automatically configures its internal networking. The CNI plugin creates an overlay network that connects Kubernetes workloads and assigns IP addresses to pods.
- No manual pod-network setup is required for the standard Kubernetes Cluster package.
- Pods receive network addresses through the cluster networking layer.
- The overlay network allows workloads running on different Kubernetes nodes to communicate through the Kubernetes networking model.
Access Services by Name
Kubernetes supports direct access to Services by DNS name. A separate service-discovery mechanism is therefore not required for ordinary communication between Kubernetes applications.
For example, an application can connect to a database using the database Service name. Kubernetes resolves that DNS name to the Service’s internal address and forwards traffic to the pods selected by the Service.
Default Hello World Example
The standard Kubernetes Cluster package includes a Hello World deployment, Service, and Ingress by default unless the Custom Deployment option was selected during cluster installation.
Platform DNS Resolution inside Pods
Kubernetes uses CoreDNS to resolve internal Kubernetes DNS names. The DNS configuration is automatically added to the /etc/resolv.conf file inside each pod.
/etc/resolv.conf
CoreDNS also uses the platform nameservers. This allows Kubernetes pods to resolve and connect directly to other containers running inside the platform, not only to Kubernetes Services.
Connect Kubernetes Pods to Platform Databases
If a database is running in another platform environment, a Kubernetes pod can connect to it using the database node’s internal platform hostname.
${nodeId}-${envName}.${platformDomain}
Use the database’s standard port together with this hostname. Common examples include:
3306
5432
Access from Outside the Platform
Internal platform DNS names are intended for communication inside the platform. If an external system must connect to a database or another internal service, create an appropriate platform endpoint for that service.
What’s next?
- Kubernetes Helm Integration
- Kubernetes YAML Deployments
- Kubernetes Exposing Services
- Kubernetes Creating Ingresses
