- A running k8s cluster (eg. with Rancher 2.0)
- A recent go version installed
.kube/configconfigured 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-operatorkubectl create -f deploy/examples/namespace.yaml, if you use rancher, you want to move that namespace manually to theDefaultproject- 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.yamlkubectl create -f deploy/rbac.yamlkubectl 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.yamlexport WATCH_NAMESPACE=odoooperator-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.