OPERATING SYSTEMSOS Linux

Static Volume Management In Kubernetes Cluster Series ; Part 04

Storage Services In Kubernetes

Capacity planning in Kubernetes is very simple if it is systematic.At the same time, the solution will get complex if we haven’t taken the necessary planning before rolling out or designing the storage mechanism as the pods are ephemeral. We have multiple options to store the data pertained to a Pod.
A Pod can be created by defining the filesystem directory in the declaration form. In this case, the data will be saved within the Pod. The data will be deleted as soon as the Pod gets deleted. Software binaries, Cache directories etc.can be created using this method as it is not needed anymore once the Pod is deleted.

We can map the data of a Pod to the local storage of a Worker Node where the Pod is running. In this case, even when the Pod is deleted, the data will remain in the directory which will be present in the Worker Node. If we rely on multiple nodes and a bunch of Pods, then there will be data loss. As the Pod may switch over to multiple Nodes, the data will not be replicated to the respective nodes, so that, there is a chance to lose the data. Indeed, if we use the ‘nfs’ for this task, this method will be successful. Since this method is not bundled with Kubernetes, we are relying on a dynamic provisioning mechanism for production deployments.

We can create a directory structure by mapping the subpath, in this case, we will define the directories that come under a single directory (assume that ‘web’ is a directory for a web server, the website content saved in the ‘/web/data’, logs saved under ‘/web/log’, session details saved under ‘/web/session’.) and create a subpath along with ‘FileOrCreate’/’DirectoryOrCreate’ option so that even if the directory is not present, the cluster will create the desired file/directory.

Kubernetes is compatible with leading cloud service solutions.AWS, Azure, VMware, Google, etc. cloud storage can be mapped with the Kubernetes cluster. It is to be noted that the appropriate cloud connector must be installed on all Worker nodes in order to enable the connectivity as well as the seamless i/o.

Linux Foundation has defined a Container Storage Interface in order to meet a particular standard. A storage solution that is compliant with the CSI standard can be integrated with the Kubernetes.

#kubernetes #docker #conatiner #DevOps #practicaldocker #practicedocker #masternode #workernode #pods #deployment #nodes #tutorial #kodekubez #2020

source

linux foundation

Leave a Reply

Your email address will not be published. Required fields are marked *