How to Import a Managed Digital Ocean Kubernetes cluster in Rancher
This post contains affiliate links to Digital Ocean. It will get you $100 to test out the platform, and if at some point you start using it for real I will earn $25.
Digital ocean (DO) recently announced their managed offering for kubernetes. Rancher is a tool that helps you manage multiple Kubernetes clusters in one interface but it does not yet support the new DO offering natively, and I was wondering if one could import a DO managed cluster in your Rancher instance.
Turn out you can, here is how.
TL;DR: just follow the importer
If you already know how to use the importer for existing clusters then you are good to go. If not, just go there, chose the “Existing Cluster Import” option and follow the steps to import your DO managed cluster 🙂
Illustrated Guide
Here is a step by step guide on doing the import. It assumes you already have a Rancher instance running somewhere. (Here is a nice and straightforward guide on running Rancher on DO).
- Your very first step is to go create a managed cluster on DO. For that connect to your account, and in the sidebar select the “Kubernetes” menu. When there, follow the guide to create your cluster.
- Now that your cluster is provisioning you can download its configuration. We
are going to use it to connect to it via
kubectl
.
- Open your rancher interface, and click on the “Add Cluster” button
- Select the “Import existing cluster”
- The importer will give you a
kubectl
command to run against your Digital Ocean cluster. Use the previously downloaded config file to run it:
1 2 |
$ kubectl --kubeconfig=config-from-do.yml apply -f \ https://your.rancher.domain/v3/import/lotofgibberishrlasxtowg.yaml |
- When the configuration has been applied, your cluster should be imported and available in your rancher interface
And voilà, you have imported a Digital Ocean managed cluster in your Rancher 🎉
Did you enjoy this article? Don't want to miss any new posts and get exclusive content? Then hop into my newsletter :)
You can also contact me directly via email: m [-at-] mayeu [-dot-] me