Kubernetes operator for CDAP
Alpha
The CDAP Operator is still under active development and has not been extensively tested in production environment. Backward compatibility of the APIs is not guaranteed for alpha releases.
- Version >= 1.9 of Kubernetes.
- Version >= 6.0.0 of CDAP
You can checkout the CDAP Operator source code, build and run locally. To build the CDAP Operator, you need to setup your environment for the Go language. Also, you should have a Kubernetes cluster
- Checkout CDAP Operator source
mkdir -p $GOPATH/src/cdap.io cd $GOPATH/src/cdap.io git clone https://github.com/cdapio/cdap-operator.git cd cdap-operator
- Generates and install the CRDs
make install
- Compiles and run the CDAP Operator
make run
- Deploy CDAP CRD to the cluster
kubectl apply -f config/crds
- Edit the sample CDAP CR and deploy to the cluster
kubectl apply -f config/samples/cdap_v1alpha1_cdapmaster.yaml
You can also build a docker image containing the CDAP controller and deploy it to Kubernetes.
- Build the docker image
You can change the target image name and tag by setting the
IMG=cdap-controller:latest make docker-build
IMG
environment variable. - Push the docker image
IMG=cdap-controller:latest make docker-push
- Deploy CDAP CRD and RBAC to the cluster
make deploy
A step by step guide of running CDAP in Kubernetes using CDAP operator can be found in the blog post.