- A running k8s cluster (eg. with Rancher 2.0)
- A recent go version installed
.kube/config
configured to access the cluster- An external postgres database service
- Operator-SDK installed, start here: https://github.com/operator-framework/operator-sdk#quick-start
gotchas incorporated
git clone https://github.com/xoe-labs/odoo-operator && cd odoo-operator
kubectl create -f deploy/examples/namespace.yaml
, if you use rancher, you want to move that namespace manually to theDefault
project- Review config
kubectl config view
- Verify current context
kubectl config current-context
- Set namespaced context
kubectl config set-context odoo-ctx --namespace=odoo
- Use it
kubectl config use-context odoo-ctx
kubectl create -f deploy/crd.yaml
kubectl create -f deploy/rbac.yaml
kubectl create -f deploy/examples/pv.yaml
- Resolve the TODO in
nano deploy/examples/ext-db-service.yaml
kubectl create -f deploy/examples/ext-db-service.yaml
export WATCH_NAMESPACE=odoo
operator-sdk up local
- In another terminal:
kubectl create -f deploy/examples/odoocluster.yaml
Rancher does not support appsv1 api yet (only some beta apis), so to get full visibility into your deployments, complete this challenge: https://gist.github.com/superseb/3a9c0d2e4a60afa3689badb1297e2a44 and you will see again.