Writing Kubernetes manifests is a job in itself. It's complicated, easy to get wrong and way too hard to get really right. Let's automate it away then.
Enter the Rokalyuk
Rokalyuk is a tool to quickly scaffold your Kubernetes cluster on Civo. To use it, you'll need the following:
bash
(you probably have it if you use a Mac or Linux. On Windows you might want to make sure you have git bash or similar)git
(you probably have it, but if not it's free to get)kubectl
(get it for your OS)helm
(it's there in your package manager)- A Kubernetes cluster running on Civo, with the
KUBECONFIG
for your cluster downloaded and set as your current context. For more detail, refer to "Your Cluster Kubeconfig" here.
By the way, "rokalyuk" is Hungarian for "fox hole". Instead of chasing bunnies, it's time to dive into the fox den, Alice.
Get Rokalyuk
The repository can be found on GitHub at https://github.com/valerauko/rokalyuk. We will begin by cloning the repository to your machine:
git clone https://github.com/valerauko/rokalyuk
Get ready
You'll need a few things to get up and running.
Civo API token
Get your Civo API token from your account dashboard. You can reset this anytime if you accidentally post it anywhere, like on Twitter.
In the quite "exciting" case that happens, you can tell your cluster about the change by updating the secret that contains it.
A domain name
Use a domain name you control. You should set the domain's name servers to those of Civo. Refer to the DNS Guide to set it up.
Your Civo region
You can see your Civo region in the bottom left of your dashboard. At the point of writing, you can choose either LON1 or NYC1.
Install!
On your terminal, navigate to the repository you cloned and run the install.sh
script:
./install.sh
Your stuff
Rokalyuk is only a convenient scaffold for a cluster. While it's nice looking at colorful Grafana graphs of Prometheus monitoring of Argo CD, the whole point is getting your stuff out there!
I recommend using Argo CD for managing the deployment of your apps. Since Rokalyuk utilizes that too, everything will be in one place then.
Keep it simple
For a simple setup, see the Rokalyuk example. This is a minimal setup showing one static HTML file.
Go more complicated
If you want to deploy multiple apps in your cluster (and you probably do), then I recommend making a git repository of Argo CD Applications describing each of your "pets" (i.e. applications) in Argo CD's declarative way, described here. Once that's set up, make yet another Application (the bootstrap) that points to that git repo and manually apply it (using kubectl apply -f my-app.yaml or similar). Once that's set up, make yet another Application (the bootstrap) that points to that git repo and manually apply it (using kubectl apply -f my-app.yaml
or similar).
This will send Argo on a great journey of installing all your applications. Just make sure that the bootstrap and the others reside in a different location, or you might accidentally send Argo on an infinite journey.
While Rokalyuk uses Helm to make installation and customization simple (so there are template strings in the manifest files), you can see its bootstrap phase and the Applications it installs for reference.
Godspeed!
I hope this guide helps you get started on your Civo journey. If you run into any problems, drop by on the Civo Slack channels where somebody will surely be able to help you!