Fixing storage mount issues

In this section, you will fix the issue we experienced earlier in this chapter of non-persistent storage if a node goes down. Before we start, let's make sure that the cluster is in a clean state:

ab443838-9b3e-4811-b287-74e417a9@Azure:~$ kc get all
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/kubernetes ClusterIP 10.0.0.1 <none> 443/TCP 4d

Get the status of running nodes:

ab443838-9b3e-4811-b287-74e417a9@Azure:~$ kc get nodes
NAME STATUS ROLES AGE VERSION
aks-agentpool-18162866-0 Ready agent 4d v1.11.5
aks-agentpool-18162866-1 Ready agent 3d v1.11.5

In the last example, we saw that the messages stored in redis-master were lost if it gets restarted. The reason for this is that redis-master stores all data in its container, and whenever it is restarted, it uses the clean image without the data. In order to survive reboots, the data has to be stored outside. Kubernetes uses PVCs to abstract the underlying storage provider to provide this external storage.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset