Setting up a Kubernetes lab with Rancher — Part 3 Adding Applications

Fusion
4 min readApr 12, 2019

--

Part 1 https://medium.com/@svfusion/setting-up-a-kubernetes-lab-with-rancher-part-1-setting-up-the-host-f8bea9c8553

Part 2 https://medium.com/@svfusion/setting-up-a-kubernetes-lab-with-rancher-part-2-adding-nodes-9ec0027d4aab

Now that you are at Part three of the guide, you are ready to install applications. This guide assumes you have gone through Parts 1 & 2 and ready to launch workloads.

We are going to launch Wordpress from the default repository. This will be a simple deployment and will serve as a PoC for the app. This deployment will not use persistent storage meaning that changes made on the workload (wordpress) will not be saved if you restart the pod (container). A guide on how to use these types of deployments are on their way, but out of scope for the purpose of this guide.

Launching your first app — Wordpress

First, log in to your Rancher Host via the WebUI. Then, click on the cluster you created.

Now click on, Add Project

Give your project a name and click on Create

Click on the new project

Click on Apps

Click on Launch

Scroll to the bottom and click on Wordpress

Configuring your Blog

Enter in the wordpress username you want to use, your email, and set a password for both the wordpress user and the mariadb.

If you plan on using this for than a test, select “MariaDB Persistent Volume Enabled” and “Wordpress Persistent Volume Enabled”. If you do not do this, all information will be lost when you restart the container. Since this is just a test to see how it works, I’m choosing false and leaving everything else to default.

Leave this defaulted as well, and click on Launch

It will start deploying the workload

You can click on the app name to see the process

When everything is complete (all states are active and green), click on the HTTP endpoint link to go to your wordpress site

Now, since you got a simple understanding of how to deploy a workload, let’s remove the WordPress deployment.

Remove Application

Click on Apps on the top of the Rancher UI

Click on the menu for the wordpress app and click on Delete

Confirm you want to delete

Now that you have finished all three parts of this guide, you have a good understanding of the basics of Rancher. When you are creating production workloads, you will have to get more into the settings for networking and storage. You will also want to use a reverse proxy to make your workloads available externally if needed.

I will continue creating guides for Rancher and I hope you keep reading. If you run into issues or have questions, feel free to reach out to me.

--

--