Getting started with Razee —Remote Resources

Michael McKay
ibm-ks
Published in
3 min readMay 31, 2019
Razee.io

I’m the delivery lead for the IBM Cloud Kubernetes Service. Over the past few years we have had to figure out how to manage hundreds of deployments across dozens of clusters spread around the globe. As we transitioned from building and deploying a single monolith to a true micro-service deployment process, we developed Razee.

Razee is a new Continuous Delivery platform specifically designed for managing apps in a multi-cluster Kubernetes environment. You can get started with Razee by checking out razee.io.

In this post I’m going to walk through using one of the basic components of Razee, the RemoteResource. A RemoteResource is a Kubernetes CRD (custom resource definition) which applies and maintains a Kubernetes resource YAML from a remote URL. Once you create a RemoteResource on your cluster, that resource will download and apply the Kubernetes resource located at the URL defined in the RemoteResource. Anytime the remote location gets updated, the RemoteResource will automatically download and apply the update.

Step 1 — Get Razee Kapitan installed on your cluster.

The easiest way to install Razee Kapitan is to run the following command against your Kubernetes cluster. Details can be found here.

kubectl apply -f https://github.com/razee-io/Kapitan-delta/releases/latest/download/resource.yaml

Step 2 — Define a RemoteResource

A RemoteResource defines the location of a Kubernetes resource. Any available URL will do as long as the URL is accessible from your cluster. You can specify one or more URLs in a RemoteResource. You can optionally supply HTTP headers for each URL if needed.

Format for Razee RemoteResource CRDs

In my example, I have a RemoteResource which points to a ConfigMap I have stored in Github.com.

Sample RemoteResource to install a ConfigMap

Step 3 — Deploy the RemoteResource

The RemoteResource can be applied to your cluster either from a local file, or a remote URL. In this case I’m going to install using the RemoteResource I have stored in Github.

kubectl apply -f https://raw.githubusercontent.com/mckaymic/RazeeDemo/master/remoteresouce.yaml
Apply RemoteResource

Once the RemoteResource has been applied you can check the status of it by describing the resource.

kubectl describe RemoteResource remoteconfigmap
Describe RemoteResource

Let’s just verify that the ConfigMap also got applied.

kubectl get configmap sampleconfig -o yaml
Get ConfigMap

Step 4 — Update the resource

Now let’s update the ConfigMap I have stored in Github. I’ve changed the value of mydata from c to d. Once this is saved, the RemoteResource will pickup the updated ConfigMap and apply it to your cluster.

Github.com

Let’s verify that the ConfigMap got updated.

kubectl get configmap sampleconfig -o yaml
ConfigMap with updated value

What’s next?

With Razee RemoteResource you can now distribute your Kubernetes resources easily. In my next post, I’ll show how you can use Razee templates to customize your deployments for different clusters.

--

--

Michael McKay
ibm-ks
Editor for

NCR Retail SRE Architect and Innovation lead. Opinions here are my own.