The Turbonomic Platform Operator (t8c-operator) makes it easy for Turbonomic Administrators to deploy and operate Turbonomic Platform deployments in a Kubernetes infrastructure. Packaged as a container, it uses the operator pattern to manage Turbonomic-specific custom resource, following best practices to manage all the underlying Kubernetes objects for you.
This repository is used to build the Turbonomic Platform Operator (t8c-operator).
NOTE Documentation on how to deploy the Turbonomic Platform on kubernetes is being maintained in this project's wiki. Start here.
You must have Docker Engine installed to build the Turbonomic Platform Operator. The Kubernetes Operator SDK also must be installed to build this project.
git clone -b v0.15.0 https://github.com/operator-framework/operator-sdk
cd operator-sdk
make install
You may need to add $GOPATH/bin
to you path to run the operator-sdk
command line tool:
export PATH=${PATH}:${GOPATH}/bin
git clone https://github.com/turbonomic/t8c-install.git
cd t8c-install/operator
You can build the operator by just running make
.
Other make targets include (more info below):
make all
: builds theturbonomic/t8c-operator
docker image (same asmake image
)make image
: builds theturbonomic/t8c-operator
docker imagemake package
: generates tarball of theturbonomic/t8c-operator
docker image and installation YAML filemake local
: builds the t8c-operator binary for test and debugging purposesmake clean
: removes the binary build output andturbonomic/t8c-operator
container imagemake run
: runs the t8c operator locally, monitoring the Kubernetes cluster configured in your currentkubectl
contextmake fmt
: runsgo fmt
on all*.go
source files in this projectmake lint
: runs thegolint
utility on all*.go
source files in this project
If you are using a local, single-node Kubernetes cluster like
minikube or Docker Desktop,
you only need to build the turbonomic/t8c-operator
image.
You can skip the rest of this section.
If possible, we recommend re-tagging your custom-built images and pushing them to a remote registry that your Kubernetes workers are able to pull from.
Use this to run the operator as a local foreground process on your machine:
make run
This will use your current Kubernetes context from ~/.kube/config
.
To deploy Turbonomic into a Kubernetes cluster, follow the documentation here.
Remember the custom resource defines your Turbonomic instance's configuration. To modify the Turbonomic platform, leverage the custom resource to make changes and apply:
kubectl apply -f https://raw.githubusercontent.com/turbonomic/t8c-install/master/operator/deploy/crds/charts_v1alpha1_xl_cr.yaml -n turbonomic
Delete the Turbonomic custom resource, to destroy an instance of Turbonomic within the namespace
kubectl delete -f https://raw.githubusercontent.com/turbonomic/t8c-install/master/operator/deploy/crds/charts_v1alpha1_xl_cr.yaml -n turbonomic
You can stop and remove the operator by running
kubectl delete -f https://raw.githubusercontent.com/turbonomic/t8c-install/master/operator/deploy/operator.yaml -n turbonomic
kubectl delete -f https://raw.githubusercontent.com/turbonomic/t8c-install/master/operator/deploy/role_binding.yaml -n turbonomic
kubectl delete -f https://raw.githubusercontent.com/turbonomic/t8c-install/master/operator/deploy/role.yaml -n turbonomic
kubectl delete -f https://raw.githubusercontent.com/turbonomic/t8c-install/master/operator/deploy/service_account.yaml -n turbonomic
kubectl delete -f https://raw.githubusercontent.com/turbonomic/t8c-install/master/operator/deploy/crds/charts_v1alpha1_xl_crd.yaml
kubectl delete ns turbonomic