Handling node failures
Intentionally (to save costs) or unintentionally, nodes can go down. When that happens, you don't want to get the proverbial 3 a.m. call that your system is down. Kubernetes can handle moving workloads on failed nodes automatically for you instead. In this exercise, you are going to deploy the guestbook application and bring a node down in your cluster to see what Kubernetes does in response:
- Ensure that your cluster has at least two nodes:
kubectl get nodes
This should generate an output as shown in Figure 5.1:
Figure 5.1: List of nodes in the cluster
If you don't have two nodes in your cluster, look for your cluster in the Azure portal, navigate to Node pools, select the pool you wish to scale, and click on Scale. You can then scale Node count to 2 nodes as shown in Figure 5.2:
Figure 5.2: Scaling the cluster
- As an example application in this section, deploy the guestbook application. The YAML file to deploy this has been provided in the source...