The 4th factor (Backing services) of the Twelve-Factor App Methodology states:
The code for a twelve-factor app makes no distinction between local and third party services. To the app, both are attached resources, accessed via a URL or other locator/credentials stored in the config.
In the following steps you will learn:
- how your containerized application can find and call other services,
- how DNS providers can plug themselves into the cluster,
- how service discovery works in Kubernetes.
Discovering services through simple labels provided from environment settings makes calling other services easy from your application. When you decide on a Kubernetes cluster to use, one of the first things you should investigate is what service flavor provides the DNS resolutions.
The lesson does not cover more complex topics such as meshing, ingressing, egressing nor security protections. But, with these fundamentals you can now expand into those topics.
Here are some addition Katacoda courses:
With these steps you have learned:
- ✔ how your containerized application can find and call other services,
- ✔ how DNS providers can plug themselves into the cluster,
- ✔ how service discovery works in Kubernetes.
- Connecting Applications with Services
- DNS for Services and Pods
- Configuring Redis using a ConfigMap
- Cluster DNS: CoreDNS vs Kube-DNS
Pods to Services Communication
Your Kubernetes Cluster
For this scenario, Katacoda has just started a fresh Kubernetes cluster for you. Verify it's ready for your use.
kubectl version --short && \
kubectl get componentstatus && \
kubectl get nodes && \
The Helm package manager used for installing applications on Kubernetes is also available.
helm version --short
You can administer your cluster with the
kubectl CLI tool or use the visual Kubernetes Dashboard. Use this script to access the protected Dashboard.