In this guide, you will learn:
- How to deploy the operator from a released package or scratch
- The core CRDs the operator supports
You could provision the operator from a binary package or build from sources.
- Go to the download page to download the latest release binary,
skywalking-swck-<SWCK_VERSION>-bin.tgz
. Unarchive the package to a folder namedskywalking-swck-<SWCK_VERSION>-bin
- To install the operator in an existing cluster, make sure you have
cert-manager
installed. - Apply the manifests for the Controller and CRDs in
config
:
kubectl apply -f skywalking-swck-<SWCK_VERSION>-bin/config/operator-bundle.yaml
- Download released source package or clone the source code:
git clone [email protected]:apache/skywalking-swck.git
- Build docker image from scratch. If you prefer to your private
docker image, a quick path to override
OPERATOR_IMG
environment variable :export OPERATOR_IMG=<private registry>/controller:<tag>
export OPERATOR_IMG=controller
make -C operator docker-build
Then, push this image controller:latest
to a repository where the operator's pod could pull from.
If you use a local KinD
cluster:
kind load docker-image controller
-
Customize resource configurations based the templates laid in
operator/config
. We usekustomize
to build them, please refer to kustomize in case you don't familiar with its syntax. -
Install the CRDs to Kubernetes:
make -C operator install
- Use
make
to generate the final manifests and deploy:
make -C operator deploy
- Deploy a sample OAP server, this will create an OAP server in the default namespace:
curl https://raw.githubusercontent.com/apache/skywalking-swck/master/operator/config/samples/default.yaml | kubectl apply -f -
- Check the OAP server in Kubernetes:
kubectl get oapserver
- Check the UI server in Kubernetes:
kubectl get ui
If you encounter any issue, you can check the log of the controller by pulling it from Kubernetes:
# get the pod name of your controller
kubectl --namespace skywalking-swck-system get pods
# pull the logs
kubectl --namespace skywalking-swck-system logs -f [name_of_the_controller_pod]
The custom resources that the operator introduced are:
The JavaAgent
custom resource definition (CRD) declaratively defines a view to tracing the injection result.
The java-agent-injector creat JavaAgents once it injects agents into some workloads.
Refer to Java Agent for more details.
The OAP
custom resource definition (CRD) declaratively defines a desired OAP setup to run in a Kubernetes cluster.
It provides options to configure environment variables and how to connect a Storage
.
The UI
custom resource definition (CRD) declaratively defines a desired UI setup to run in a Kubernetes cluster.
It provides options for how to connect an OAP
.
The Storage
custom resource definition (CRD) declaratively defines a desired storage setup to run in a Kubernetes cluster.
The Storage
could be managed instances onboarded by the operator or an external service. The OAP
has options to select
which Storage
it would connect.
Caveat:
Stroage
only supports theElasticsearch
.
The Satellite
custom resource definition (CRD) declaratively defines a desired Satellite setup to run in a Kubernetes cluster.
It provides options for how to connect an OAP
.
The Fetcher
custom resource definition (CRD) declaratively defines a desired Fetcher setup to run in a Kubernetes cluster.
It provides options to configure OpenTelemetry collector, which fetches metrics to the deployed OAP
.
There are some instant examples to represent the functions or features of the Operator.