With Kubernetes, you can freely make use of the hybrid, on-premise, and public cloud infrastructure to run deployment tasks of your project.Īnd Docker lets you create containers for a pre-configured image and application. Is a management system that provides a platform for deployment automation. Once you’re logged in you can execute the following commands mon_endpoints=$(grep mon_host /etc/ceph/ceph.Kubernetes is an open-source platform for managing containers such as Docker. Next shell into the pod and execute commands to test your installation kubectl -n rook exec -it rook-tools bash Make sure the pod is running kubectl -n rook get pod rook-tools Testing the File SystemĪnother way to test is using Rook Toolbox and mount the volume. We did this by creating a fsvolume container that all it does is mount the file system to easily browse files. Remember you’ll need to pre-create the sub-directories on the fs before you can use that path and mount on a pod. We have different groups use different sub-directories. $ kubectl create -f rook-filesystem.yamlĪfter that has been completed you can now mount the file system on your pods. I personally edited mine, updated the name and most important to have replicated size = 3, so we have redundancy in the data being store in case any single node goes out. To create a file system, you can run the rook-filesystem. This is features is experimental, where it does work, but multiple fs will cause your mons to crash. A big no no, I’m going to tell you now that we got hung up on for a while, do not create multiple file systems. We did this by setting up a CephFS file system. Creating a File Systemīecause of that we needed to have an ftp, rsync, and registry pods all on the same file structure. Meaning it can only be mounted on a single pod, doesn’t allow you to have multiple pods all pointing to the same file structure. One thing about volumes and pods, they are one to one. You can check to make sure it worked $ kubectl get pvcĪnd you’ll see your persistent volume claims being setup. I personally changed both of mine from the resources requests storage to 20GB of storage to 1GB, that’s overkill for a simple test WP installation. Lets test it out using the Rook WordPress example setup $ kubectl create -f mysql.yaml Now you’re able to use a volume type of “rook-block”. Before running this example file, I changed the setting replicated size = 3, we want all of our storage to be redundant in case a single nodes has a problem. This do this you’ll need to create a storage class. If you’re using a pod and want to do a persistent volume (pv and pvc) you’ll need to have block storage enabled, otherwise your pod’s storage is tied to a node which can be bad. Next you’ll need to apply the settings for doing block storage. You’ve got the Monitors (mon), Storage (osd), Manager (mgr) all running now. Rook-ceph-mgr0-cfccfd6b8-hv7kz 1/1 Running 0 3d Rook-ceph-mds-clusterfs-585d54994f-jhwtc 1/1 Running 0 1d That gets you up and running you should see something like these pods all running in the Rook namespace $ kubectl -n rook get pods
#Install kubernetes cluster on centos linuxacademy install
Then we’re going to install Rook using the examples $ git cd rook/cluster/examples/kubernetes/ Create Rook Installationįirst we need to clone the Rook Github repository, on my desktop where I’ve got kubectl installed I did the following
![install kubernetes cluster on centos linuxacademy install kubernetes cluster on centos linuxacademy](https://res.cloudinary.com/acloud-guru/image/fetch/c_fill,f_auto,h_350,w_350/https://acloudguru-content-assets-production.s3-accelerate.amazonaws.com/1596504478198-Course%20Artwork__ForWeb_KubernetesQuick.png)
These are the steps we went through to get our installation up and running. In the future they say other storage systems, but Ceph is what we needed.
![install kubernetes cluster on centos linuxacademy install kubernetes cluster on centos linuxacademy](https://user-images.githubusercontent.com/300046/116794209-86df7e00-aa88-11eb-955f-6c0ee129bdec.png)
Rook is a cloud native storage service that works with Ceph. There are a few options available, and we chose to go with Ceph.Īfter struggling with the Ceph Docker container project, I came across Rook. It needs to be something that will allow the pod to move between nodes if something happens while at the same time not killing the data storage if the pod is moved. Something that works well with the idea of Kubernetes (k8s for short). You were probably wondering like me what is the right solution for storing files.
![install kubernetes cluster on centos linuxacademy install kubernetes cluster on centos linuxacademy](https://3.bp.blogspot.com/-VLzvZrJMknI/XkqmN4PAnJI/AAAAAAAAH2I/h_RsYMcX-4AtMLkPrYyveXqPzPalhjFNQCLcBGAsYHQ/s1600/install-kubernetes-cluster-ubuntu-server-18-lts.jpg)
We’ve got our new Kubernetes self hosted cluster running, and now have a need for pod storage. Creating a Ceph storage cluster on Kubernetes with Rook