This is operator to automate Apex Oracle Application Express 19.1 and Ords oracle rest data service via kubernetes CRD ,it creates a brand new Oracle 19c database statefulset,apex, ords deployment plus load balancer in the kubernetes cluster. This operator is using kubebuilder to create a framework. Tested in KIND and AWS EKS. It has upgraded with kubebuilder v3.1 controller-runtime v0.9.2 Golang 1.16.5
- check kubectl cluster-info is working properly
- git clone https://github.com/HenryXie1/apexords-operator
- make install
- create Oracle 19c DB statefulset
- install Apex 19.1 into the DB
- install and configurate Ords into the DB
- start http as sidecar for Ords
- create loadbalancer for the Apex service
- make install
- make run
- it will run controller locally while communicating with K8S master
- all controller logs display on the screen
- run below cmd
cat <<EOF | kubectl apply -f -
apiVersion: operator.apexords-operator/v1
kind: ApexOrds
metadata:
name: apexords-apexdevords
spec:
# Add fields here
dbname: apexdevcdb
dbservice: apexdevpdb
ordsname: apexdevords
# apexruntimeonly: True
EOF
- kubectl get apexords
- make docker-build
- make docker-push IMG="some-registry"/apexords-controller
- Modify image locations on yaml files under config/default/
- make deploy
- run below cmd
cat <<EOF | kubectl apply -f -
apiVersion: operator.apexords-operator/v1
kind: ApexOrds
metadata:
name: apexords-apexdevords
spec:
# Add fields here
dbname: apexdevcdb
dbservice: apexdevpdb
ordsname: apexdevords
# apexruntimeonly: True
EOF
- kubectl get po -n apexords-operator-system
- find apexords controller pod
- kubectl logs -f controller-pod-name -n apexords-operator-system
- see controller logs of what happened include password infor
- kubectl get apexords
- kubectl get svc
- find nodeport or Loadbalancer IP or DNS details
- open browser to access
- workspace: internal
- username: admin
- password: find it in controller logs output
- kubectl delete apexords the-apexords-name
- As we put owner reference for apexords , it will delete all related statefulesets, deployments,loadbalancer,configmap....etc
- PV will not be deleted,thus Data won't be lost.