Operator Usage Guide
Guides of Operator Deployment
Use kustomize to customise your deployment
- Clone the source code:
git clone git@github.com:apache/skywalking-swck.git
-
Edit file
operator/config/default/kustomization.yamlfile to change your preferences. If you prefer to your private docker image, a quick path to overrideOPERATOR_IMGenvironment variable :export OPERATOR_IMG=<private registry>/controller:<tag> -
Use
maketo generate the final manifests and deploy:
make -C operator deploy
- Deploy the CRDs:
make -C operator install
Test your deployment
- 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
Troubleshooting
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]
Custom manifests templates
If you want to custom the manifests templates to generate dedicated Kubernetes resources,
please edit YAMLs in pkg/operator/manifests.
After saving your changes, issue make update-templates to transfer them to binary assets.
The last step is to rebuild operator by make -C operator docker-build.
Custom Resource Define(CRD)
The custom resources that the operator introduced are:
JavaAgent
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.
OAP
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.
UI
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.
Storage
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:
Stroageonly supports theElasticsearch.
Satellite
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.
Fetcher
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.
Examples of the Operator
There are some instant examples to represent the functions or features of the Operator.