Install Kubeapps on your Kubernetes cluster

1. Overview

This tutorial will guide you through the installation of Kubeapps on Charmed Kubernetes.

Kubeapps

Kubeapps is a Kubernetes dashboard that supercharges your Kubernetes cluster with simple browse and click deployment of applications. Kubeapps provides a complete application delivery environment that empowers users to launch, review and share applications.

kubeapps hub

What you’ll learn

  • How to configure dynamic volume provisioning for your Kubernetes cluster on AWS
  • How to supercharge your cluster with Kubeapps

What you’ll need


2. Create your cluster

On your local machine, install conjure-up with the following command:

sudo snap install conjure-up --classic

Install Charmed Kubernetes using conjure-up.

conjure-up charmed-kubernetes

cdk-install-with-conjure-up

Follow the on-screen instructions to select AWS as the cloud provider and specify the AWS credentials in subsequent prompts.

To add support for dynamic volume provisioning; navigate to the Advanced Configuration page of the kubernetes-master application and set the value of the api-extra-args field to admission-control=Initializers,NamespaceLifecycle,LimitRanger,ServiceAccount,ResourceQuota,DefaultTolerationSeconds,DefaultStorageClass and trigger the deployment.

kubernetes-master-config-1

kubernetes-master-config-2

cdk-kubernetes-master-config-3

After the installation has completed, lets configure kubectl to talk to our cluster.

mkdir -p ~/.kube
juju scp kubernetes-master/0:config ~/.kube/config

What is “juju scp”?

Juju is a tool used by conjure-up for managing software deployments’ installation, configuration and management. It was installed by juju snap package if the command if it wasn’t found.

Now let’s verify that we’re able to communicate with our Kubernetes cluster:

kubectl cluster-info

If you do not have the kubectl command already installed, install it with:

sudo snap install kubectl --classic

3. Setup dynamic disk provisioning

The Chrmed Kubernetes does not define a default storage class and since we’ve setup our cluster on the AWS cloud, let’s define a storage class named gp2 which will dynamically provision storage for PersistentVolumeClaim's from Amazon EBS.

Create a file named gp2-storageclass.yaml with the following content:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: gp2
  annotations:
    storageclass.beta.kubernetes.io/is-default-class: "true"
provisioner: kubernetes.io/aws-ebs
parameters:
  type: gp2
reclaimPolicy: Delete

Next, create the storage class using the command:

kubectl create -f gp2-storageclass.yaml

Let’s verify the storage class was created:

kubectl get storageclass

4. Deploy kubeapps

Use the following commands to install the Kubeapps CLI to your local Linux machine:

curl -s https://api.github.com/repos/kubeapps/kubeapps/releases/latest | grep linux | grep browser_download_url | cut -d '"' -f 4 | wget -i -
chmod +x kubeapps-linux-amd64
sudo mv kubeapps-linux-amd64 /usr/local/bin/kubeapps

Fasten your seatbelt! it’s time we supercharge the cluster with Kubeapps.

kubeapps up

Kubeapps will be installed under the kubeapps namespace. We can check the status of the deployments using:

kubectl get pods --namespace kubeapps

To access the in-cluster dashboard, execute the following command:

kubeapps dashboard

That’s it! Deploy your favorite applications and functions to your Kubernetes cluster with a single click from the Kubeapps dashboard.

kubeapps deploy

Further readings