In this example, you will learn how to use the Storage.
Follow Operator installation instrument to install the operator.
apiVersion: operator.skywalking.apache.org/v1alpha1 kind: Storage metadata: name: sample spec: type: elasticsearch connectType: internal version: 7.5.1 instances: 3 image: docker.elastic.co/elasticsearch/elasticsearch:7.5.1 security: user: secretName: default tls: true
apiVersion: operator.skywalking.apache.org/v1alpha1 kind: Storage metadata: name: sample spec: type: elasticsearch connectType: external address: "https://elasticsearch" security: user: secretName: default
$ kubectl apply -f sample.yaml
$ kubectl get storage NAME INSTANCES TYPE VERSION CONNECTTYPE sample 3 elasticsearch 7.5.1 internal
$ kubectl get storage NAME INSTANCES TYPE VERSION CONNECTTYPE sample elasticsearch 7.5.1 external
$ kubectl get statefulset NAME READY AGE sample-elasticsearch 3/3 7s
Here we modify the default OAP server configuration file,the new yaml file as follows:
apiVersion: operator.skywalking.apache.org/v1alpha1 kind: OAPServer metadata: name: default spec: version: 9.5.0 instances: 1 image: apache/skywalking-oap-server:9.5.0 service: template: type: ClusterIP storage: name: sample
$ kubectl apply -f oap.yaml
$ kubectl get oapserver NAME INSTANCES RUNNING ADDRESS sample 1 1 sample-oap.default
$ kubectl get pod -l app=oap NAME READY STATUS RESTARTS AGE sample-oap-5bc79567b7-tkw6q 1/1 Running 0 6m31s