You will need both kubectl
and Helm 3
to install Rudr.
-
Install
kubectl
. The below is for MacOS. For other OS, please go to https://kubernetes.io/docs/tasks/tools/install-kubectl/.curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/darwin/amd64/kubectl"
-
Install
Helm 3
. The below is copied directly from the Helm installation guide.- Download your desired version of Helm 3 from the releases page
- Unpack it (
tar -zxvf helm-v3.0.0-beta.3-darwin-amd64.tar.gz
) - Find the helm binary in the unpacked directory, and move it to its desired destination (
mv macos-amd64/helm /usr/local/bin/helm
) - From there, you should be able to run the client: helm help.
-
As of this writing, the supported versions of Kubernetes are 1.15 and 1.16, so make sure you have a Kubernetes cluster with a compatible version.
Note: In its current version, Rudr will only listen for events in one namespace. This will change in the future. For now, though, you must install Rudr into the namespace into which you will deploy Rudr apps. You may install Rudr multiple times on the same cluster as long as you deploy to a different namespace each time.
Tip: As there are some breaking changes (such as Configuration => ApplicationConfiguration, Component => ComponentSchematic), if you reinstall Rudr, make sure your old CRDs are deleted. Helm will not automatically delete CRDs. You must do this with
kubectl delete crd
. Note: In its current version, Rudr will only listen for events in one namespace. This will change in the near future.
Tip: As there are some breaking changes, if you reinstall Rudr, make sure your old CRDs are deleted.
- Helm install Rudr
$ helm install rudr ./charts/rudr --wait --set image.tag=v0.8.0
NAME: rudr
LAST DEPLOYED: 2019-08-08 09:00:07.754179 -0600 MDT m=+0.710068733
NAMESPACE: default
STATUS: deployed
NOTES:
Rudr is a Kubernetes controller to manage Configuration CRDs.
It has been successfully installed.
This will install the CRDs and the controller into your Kubernetes cluster.
Use the
--set image.tag=VERSION
to specify the version that you want installed. If you do not specify a version, the latest unstable developer release will be installed.
You can verify that Rudr is installed by fetching the CRDs:
$ kubectl get crds -l app.kubernetes.io/part-of=core.oam.dev
NAME CREATED AT
applicationconfigurations.core.oam.dev 2019-10-02T19:57:32Z
componentinstances.core.oam.dev 2019-10-02T19:57:32Z
componentschematics.core.oam.dev 2019-10-02T19:57:32Z
scopes.core.oam.dev 2019-10-02T19:57:32Z
traits.core.oam.dev 2019-10-02T19:57:32Z
You should see at least those five CRDs. You can also verify that the Rudr deployment is running:
$ kubectl get deployment rudr
NAME READY UP-TO-DATE AVAILABLE AGE
rudr 1/1 1 1 2m47s
To upgrade Rudr, typically you only need to use Helm.
Tip: During the Alpha and Beta phase of Rudr, we recommend also deleting your CRDs manually. You must do this with
kubectl delete crd
.
$ helm upgrade rudr charts/rudr
The above will update your Rudr to the latest version.
$ helm delete rudr
This will leave the CRDs and configurations intact.
NOTE: When you delete the CRDs, it will delete everything touching Open Application Model from configurations to secrets.
kubectl delete crd -l app.kubernetes.io/part-of=core.oam.dev
The above will delete the CRDs and clean up everything related with Open Application Model.
Rudr provides several traits, including ingress and autoscaler. However, it does not install default implementations of some of these. This is because they map to primitive Kubernetes features that can be fulfilled by different controllers.
The best place to find implementations for your traits is Helm Hub.
The manual scaler trait has no external dependencies.
To successfully use an ingress
trait, you will need to install one of the Kubernetes Ingress controllers. We recommend nginx-ingress.
$ helm install nginx-ingress stable/nginx-ingress
Note: You still must manage your DNS configuration as well. Mapping an ingress to example.com
will not work if you do not also control the domain mapping for example.com
.
To use the autoscaler trait, you must install a controller for Kubernetes HorizontalPodAutoscaler
s. We recommend KEDA.
$ helm install keda stable/keda
Developers may prefer to run a local copy of the Rudr daemon. To do so:
- Make sure the CRDs are installed on your target cluster
- Make sure your current Kubernetes context is set to your target cluster. Rudr will inherit the credentials from this context entry.
- From the base directory of the code, run
make run
. This will start Rudr in the foreground, running locally, but listening on the remote cluster.
You could check the appendix doc to find more information.