You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/07/20 04:06:20 UTC

[GitHub] [skywalking] kezhenxu94 commented on a change in pull request #7339: doc: Add Self Observability service discovery (k8s)

kezhenxu94 commented on a change in pull request #7339:
URL: https://github.com/apache/skywalking/pull/7339#discussion_r672789013



##########
File path: docs/en/setup/backend/backend-telemetry.md
##########
@@ -90,6 +90,45 @@ staticConfig:
     service: oap-server
 ...
 ```
+### Service discovery (k8s)
+If you deploy an oap-server cluster on k8s, the oap-server instance(pod) could not has the dedicated IP or hostname. We can leverage [OpenTelemetry Collector](https://opentelemetry.io/docs/collector/getting-started/#kubernetes) to discover the oap-server instance and scrape & transfer the metrics to OAP [OpenTelemetry receiver](backend-receivers.md#opentelemetry-receiver). 
+
+How to install SkyWalking on k8s can refer to [Apache SkyWalking Kubernetes](https://github.com/apache/skywalking-kubernetes)
+
+To set this up by the following steps:
+
+1. Set up oap-server
+- Set the metrics port 
+  ```
+  prometheus-port: 1234
+  ```
+- Set environment variables 
+  ```
+  SW_TELEMETRY=prometheus 
+  SW_OTEL_RECEIVER=default 
+  SW_OTEL_RECEIVER_ENABLED_OC_RULES=oap
+  ```

Review comment:
       It's hard to know where to set these at the first glance, let's provide a demo command somewhere like this
   
   
   ```
               helm -n istio-system install skywalking skywalking \
                    --set oap.storageType='elasticsearch' \
                    --set oap.replicas=2 \
                    --set oap.ports.prometheus-port=1234 \ # <<< Expose self observability metrics port
                    --set oap.env.SW_ENVOY_METRIC_ALS_HTTP_ANALYSIS='k8s-mesh\,persistence' \
                    --set oap.env.SW_ENVOY_METRIC_ALS_TCP_ANALYSIS='k8s-mesh\,persistence' \
                    --set oap.env.SW_OTEL_RECEIVER=default \ # <<< Enable Otel receiver
                    --set oap.env.SW_OTEL_RECEIVER_ENABLED_OC_RULES='oap\,vm\,istio-controlplane\,k8s-cluster\,k8s-node\,k8s-service' \ # <<< Add oap analyzer for Otel metrics
                    --set oap.env.SW_TELEMETRY=prometheus \
                    --set oap.env.SW_LOG_LAL_FILES=envoy-als \
                    --set oap.envoy.als.enabled=true \
                    --set ui.image.repository=$HUB/skywalking-ui \
                    --set ui.image.tag=$TAG \
                    --set oap.image.repository=$HUB/skywalking-oap \
                    --set oap.image.tag=$TAG \
                    --set oap.env.K8S_SERVICE_NAME_RULE='${service.metadata.namespace}::${service.metadata.name}' \
                    --set elasticsearch.enabled=false \
                    --set elasticsearch.config.host=elasticsearch.istio-system.svc.cluster.local
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org