Clever Operator: The best of Kubernetes and Clever Cloud

kubernetes_clever_operator
You use Kubernetes in your usual workflow and you wish to keep it this way all while using Clever Cloud? We designed the Kubernetes Clever Operator for this exact purpose!

You use Kubernetes in your usual workflow and you wish to keep it this way all while using Clever Cloud?
We designed the Kubernetes Clever Operator for this exact purpose! You get to keep on using the tools you’re familiar with, while enjoying the performant features Clever Cloud provides, such as automatic scalability or monitoring tools.

Why a Clever Operator?

We began to work on the Clever Operator following feedbacks from some of our clients using k8s or Openshift who weren’t really satisfied about the database management solutions provided by these platforms. Then, we released this operator to answer these needs and now we are proud to announce you can even find it on Operator Hub! The Clever Operator is the best way for our customers to migrate from Kubernetes or Openshift to Clever Cloud managed solutions.

How does it work?

At Clever Cloud, we provide an HTTP API to interact with the managed services we expose. This API is located at api.clever-cloud.com. The Clever Operator works as an interface between the Kubernetes Apiserver and the Clever Cloud API. It exposes Clever Cloud’s add-ons through custom resource definition. For now, it can expose the following add-ons: PostgreSQL, Redis, MySQL, MongoDB and Pulsar.

The Clever Operator is compatible with k8s v1.21.0 or above, make sure to use one of these.

How to install it? Three steps to go:

  1. First, install the Clever Operator. Either build it from the source code on Github or use our docker image on Docker Hub.
image_docker_clever_operator
Clever Operator docker image on Docker Hub
  1. Then, configure it. It boils down to setting up CLEVER_OPERATOR_* environment variables. For example, you need to create a token to connect to the API.
clever_operator_environment_variables
Clever Operator environment variables
  1. Finally, create your custom resource definition. Here is a YAML example of what it looks like, for a PostgreSQL database:

apiVersion: api.clever-cloud.com/v1
kind: PostgreSql
metadata:
  namespace: default
  name: postgresql
spec:
  organisation: orga_xxxx
  options:
    version: 13
    encryption: false
  instance:
    region: par
    plan: s_sml

Once, the resource is created you could use the Secret created by the operator as a file directly mounted in your Pod or through environment variables. You have examples of how to do it through the examples folder or following those documentations “Using Secrets as Environment Variables” or “Using Secrets as Files from a Pod“.

Now you know how the Clever Operator works! We would be happy to have your feedback about this tool. Please feel free to create an issue here, for any suggestion of enhancement you might have.

Blog

À lire également

SuperBOL: The COBOL revolution in the Cloud

COBOL, a programming language that is over 60 years old, continues to power a large proportion of the IT systems of the world's major companies, particularly in the financial and insurance sectors.
Features

Clever Cloud welcomes the first startups to the UP Programme

Clever Cloud is proud to announce the arrival of the first five startups selected to join its UP Programme, an initiative dedicated to supporting young technology companies in their growth phase.
Company

A minor update resulted in a cascade of errors: how it went wrong, what we’ve learnt

On Friday, August 2nd, 2024 Clever Cloud’s platform became very unstable, leading to downtime of varying duration and scope, for customers using services on the EU-FR-1 (PAR) region, and remote zones depending on the EU-FR-1 control plane (OVHcloud, Scaleway, and Oracle). Privates and on-premise zones weren’t impacted.
Company Engineering