# Trying out k3sup

- URL: https://baeke.info/2019/10/25/trying-out-k3sup/
- Author: Geert Baeke
- Published: October 25, 2019
- Topics: containers, kubernetes, civo, k3s, kubernetes

[k3sup](https://github.com/alexellis/k3sup) is a utility created by Alex Ellis to easily deploy [k3s](https://k3s.io/) to any local or remote VM. In this post, I am giving the tool a try on a [Civo cloud](https://www.civo.com/) Ubuntu VM. You can of course pick any cloud provider you want or use a local system.

## Deploying a VM on Civo Cloud

There’s not much to say here. Civo cloud is super simple to use and deploys VMs very fast. Just get an account and launch a new instance. Make sure you can access the VM over SSH. I deployed a simple Ubuntu 18.04 VM with 2 GBs of RAM:

![](https://baeke.info/_astro/2019-10-image-8.CRYqgHwQ_2sSfnm.webp)

*VM deployed on Civo Cloud*

**Note:** make sure you enable SSH via private/public key pair; use ssh-keygen to create the key pair and upload the contents of id\_rsa.pub to Civo (SSH Keys section)

After deployment, check that you can access the VM with **ssh chosen-user@IP-of-VM**

## Getting k3sup

On my Windows box, I used the Ubuntu shell to install k3sup:

```bash
curl -sLS https://get.k3sup.dev | sh 
sudo install k3sup /usr/local/bin/
```

You can now run the k3sup command as follows:

```bash
k3sup install --ip PUBLIC-IP-OF-CLOUD-VM --user root
```

And off it goes…

![](https://baeke.info/_astro/2019-10-image-9.BS1cvpCx_ZSV1ns.webp)

*k3s installation via k3sup over SSH*

At the end of the installation, you will see:

```
Saving file to: /home/gbaeke/kubeconfig
```

This means you can now use kubectl to interact with k3s. Just make sure kubectl knows where to find your kubeconfig file with (in my case in /home/gbaeke):

```bash
export KUBECONFIG=/home/gbaeke/kubeconfig
```

Before continuing, make sure your cloud VM allows access to TCP port 6443!

Now you can run something like **kubectl get nodes**:

![](https://baeke.info/_astro/2019-10-image-10.BTnjuxbV_DeDzp.webp)

*kubectl running in Ubuntu shell on laptop to access k3s on remote VM*

## Installing applications

k3sup allows you to install the following applications to k3s via **k3sup app install:**

-   [openfaas](https://github.com/openfaas/faas)
-   [metrics-server](https://github.com/kubernetes-incubator/metrics-server)
-   [inlets-operator](https://github.com/inlets/inlets-operator)
-   [cert-manager](https://docs.cert-manager.io/en/latest/)

To install OpenFaas, just run **k3sup app install openfaas**. And off it goes….

![](https://baeke.info/_astro/2019-10-image-11.CSSSw7Xw_Zkkw9S.webp)

*Installing OpenFaas via k3sup*

To install other applications, just use YAML files or any other method you prefer. It’s still Kubernetes! 😊

## Conclusion

This was just a quick post (or note to self 😊) about k3sup which allows you to install k3s to any VM over SSH. It really is a great and simple to use tool so highly recommended. Note that Civo has a k3s service as well which is currently in beta. That service makes it easy to provision k3s from the Civo portal, similar to how you deploy AKS or GKE!
