### Download and Install Beyla Executable Source: https://grafana.com/docs/beyla/latest/quickstart/golang This section provides two methods for obtaining the Beyla executable. The first uses `go install` for hosts with the Go toolset installed, while the second assumes manual download from the releases page and placement in the system's PATH. ```shell go install github.com/grafana/beyla/cmd/beyla@latest ``` -------------------------------- ### Download and Run Example Ruby Service Source: https://grafana.com/docs/beyla/latest/quickstart/ruby This snippet shows how to download and run a simple example Ruby HTTP service using curl and ruby. This service is instrumentable with Beyla. ```shell curl -OL https://raw.githubusercontent.com/grafana/beyla/main/examples/quickstart/ruby/quickstart.rb ruby quickstart.rb ``` -------------------------------- ### Run Instrumentable Go Service Source: https://grafana.com/docs/beyla/latest/quickstart/golang This snippet shows how to download and run a simple example Go HTTP service that can be instrumented by Beyla. It uses `curl` to fetch the file and `go run` to execute it. ```shell curl -OL https://raw.githubusercontent.com/grafana/beyla/main/examples/quickstart/golang/quickstart.go go run quickstart.go ``` -------------------------------- ### Test Beyla Service with cURL Source: https://grafana.com/docs/beyla/latest/quickstart/golang This snippet demonstrates how to send an HTTP GET request to a service instrumented with Beyla using the cURL command-line tool. It also shows an example of the expected trace output from Beyla, detailing request time, status, method, path, source/destination, and service information. ```shell curl http://localhost:8080/foo ``` ```text 2024-01-08 14:06:14.182614 (432.191µs[80.421µs]) 200 GET /foo [127.0.0.1]->[localhost:8080] size:0B svc=[{quickstart go lima-ubuntu-lts-8222}] traceparent=[00-0f82735dab5798dfbf7f7a26d5df827b-0000000000000000-01] ``` -------------------------------- ### Beyla Trace Output Example Source: https://grafana.com/docs/beyla/latest/quickstart/ruby An example of the trace output generated by Beyla after an HTTP request. This output includes timestamps, response times, request details, source/destination information, request size, service information, and the traceparent. ```text 2024-01-09 10:31:33.19103133 (3.254486ms[3.254486ms]) 200 GET /foo [127.0.0.1]->[127.0.0.1:8080] size:80B svc=[{quickstart ruby lima-ubuntu-lts-5074}] traceparent=[00-46214bd23716280eef43cf798dbe5522-0000000000000000-01] ``` -------------------------------- ### Run Example Go Blog Service Source: https://grafana.com/docs/beyla/latest/setup/docker This command starts a simple Go blog engine service in a Docker container. This service is used as an example target for Beyla instrumentation. It exposes port 8443 internally, which is mapped to 18443 on the host. ```bash docker run -p 18443:8443 --name goblog mariomac/goblog:dev ``` -------------------------------- ### Compile and Run C++ HTTP Service Example (C++) Source: https://grafana.com/docs/beyla/latest/quickstart/cpp This snippet demonstrates how to download and compile a simple C++ HTTP service example using curl and g++. It's a prerequisite for instrumenting the service with Beyla. ```bash curl -OL https://raw.githubusercontent.com/grafana/beyla/main/examples/quickstart/cpp/httplib.h curl -OL https://raw.githubusercontent.com/grafana/beyla/main/examples/quickstart/cpp/quickstart.cpp g++ -std=c++11 quickstart.cpp -o quickstart && ./quickstart ``` -------------------------------- ### Test Beyla Instrumented Service with Curl Source: https://grafana.com/docs/beyla/latest/quickstart/python This snippet shows how to send an HTTP request to a Beyla-instrumented service using `curl` and provides an example of the expected trace output from Beyla. ```bash curl http://localhost:8080/foo ``` ```text 2024-01-09 10:31:33.19103133 (3.254486ms[3.254486ms]) 200 GET /foo [127.0.0.1]->[127.0.0.1:8080] size:80B svc=[{quickstart python lima-ubuntu-lts-5074}] traceparent=[00-46214bd23716280eef43cf798dbe5522-0000000000000000-01] ``` -------------------------------- ### Run a Java Service and Compile Source: https://grafana.com/docs/beyla/latest/quickstart/java This snippet shows how to download a sample Java service, compile it using javac, and then run the compiled Java class. This is the first step in instrumenting a Java service with Beyla. ```shell curl -OL https://raw.githubusercontent.com/grafana/beyla/main/examples/quickstart/java/Quickstart.java javac Quickstart.java && java Quickstart ``` -------------------------------- ### Install Beyla with Helm (Shell) Source: https://grafana.com/docs/beyla/latest/network/asserts These Helm commands are used to install and run Beyla for network metrics in a Kubernetes cluster. They add the Grafana Helm repository and then install the Beyla chart with a specified configuration file. ```sh helm repo add grafana https://grafana.github.io/helm-charts helm install beyla --create-namespace -n beyla -f values.yaml grafana/beyla ``` -------------------------------- ### Beyla Trace Output Example Source: https://grafana.com/docs/beyla/latest/quickstart/cpp An example of the trace output produced by Beyla after a request is made. It includes detailed information about the request and the service, such as timestamp, duration, HTTP method, path, source/destination, size, service name, and traceparent. ```text 2024-01-09 10:31:33.19103133 (3.254486ms[3.254486ms]) 200 GET /foo [127.0.0.1]->[127.0.0.1:8080] size:80B svc=[{quickstart generic lima-ubuntu-lts-5074}] traceparent=[00-46214bd23716280eef43cf798dbe5522-0000000000000000-01] ``` -------------------------------- ### Install Beyla with Default Configuration Source: https://grafana.com/docs/beyla/latest/setup/kubernetes-helm Deploys the Beyla DaemonSet to your Kubernetes cluster using the default configuration. This command installs Beyla in the 'beyla' namespace, creating it if it doesn't exist. By default, Beyla exports metrics as Prometheus metrics on port 9090 at the /metrics path. ```sh helm install beyla -n beyla --create-namespace grafana/beyla ``` -------------------------------- ### Deploy Sample HTTP Services on Kubernetes (YAML) Source: https://grafana.com/docs/beyla/latest/quickstart/kubernetes This YAML defines two Kubernetes Deployments and Services for Apache HTTP servers, simulating a website and a documentation site. It configures replicas, container images, and port mappings for basic HTTP traffic. ```yaml kind: Deployment apiVersion: apps/v1 metadata: name: docs spec: replicas: 2 selector: matchLabels: app: docs template: metadata: labels: app: docs spec: containers: - name: docs-server image: httpd:latest ports: - containerPort: 80 protocol: TCP name: http --- apiVersion: v1 kind: Service metadata: name: docs spec: selector: app: docs ports: - protocol: TCP port: 80 --- kind: Deployment apiVersion: apps/v1 metadata: name: website spec: replicas: 2 selector: matchLabels: app: website template: metadata: labels: app: website spec: containers: - name: website-server image: httpd:latest ports: - containerPort: 80 protocol: TCP name: http --- apiVersion: v1 kind: Service metadata: name: website spec: selector: app: website ports: - protocol: TCP port: 80 ``` -------------------------------- ### Port Forwarding for Testing Services (Shell) Source: https://grafana.com/docs/beyla/latest/quickstart/kubernetes These commands establish port forwarding from your local machine to the deployed Kubernetes services. This allows you to test the 'website' service on localhost:8080 and the 'docs' service on localhost:8081. ```shell # Redirect website to local port 8080 kubectl port-forward services/website 8080:80 # Redirect docs site to local port 8081 kubectl port-forward services/docs 8081:80 ``` -------------------------------- ### Beyla Route Pattern Matching Examples Source: https://grafana.com/docs/beyla/latest/configure/routes-decorator Illustrates how Beyla matches URL paths against defined patterns to set the `http.route` property. Examples show matching with named parameters and wildcard characters for flexible routing. ```yaml routes: patterns: - /user/{id} - /user/{id}/basket/{product} ``` ```text /user/123 /user/456 ``` ```text /user/123/basket/1 /user/456/basket/3 ``` ```yaml routes: patterns: - /user/* ``` ```text /user /user/123 /user/123/basket/1 /user/456/basket/3 ``` -------------------------------- ### Run Beyla with Configuration Source: https://grafana.com/docs/beyla/latest/quickstart/java This command demonstrates how to run the Beyla service with a specified configuration file. The '-config' argument points to the YAML file containing routing rules, allowing Beyla to process traces according to the defined configuration. ```bash sudo -E beyla -config config.yml ``` -------------------------------- ### Example Beyla Global Configuration Properties (YAML) Source: https://grafana.com/docs/beyla/latest/configure/options Provides an example of Beyla's global configuration settings in YAML format. These settings control trace printing, shutdown timeouts, and channel buffer length for the observability pipeline. ```yaml trace_printer: json shutdown_timeout: 30s channel_buffer_len: 33 ``` -------------------------------- ### Run a Python Service for Beyla Instrumentation Source: https://grafana.com/docs/beyla/latest/quickstart/python This snippet demonstrates how to download and run a simple Python HTTP service that can be instrumented by Beyla. It uses `curl` to download the script and `python3` to execute it. ```shell curl -OL https://raw.githubusercontent.com/grafana/beyla/main/examples/quickstart/python/quickstart.py python3 quickstart.py ``` -------------------------------- ### Set Capabilities and Start Beyla for Application Observability Source: https://grafana.com/docs/beyla/latest/security Enables Beyla for general application observability by setting specific Linux capabilities and environment variables. This configuration is suitable for tracing applications and printing trace data in text format. ```shell sudo setcap cap_bpf,cap_dac_read_search,cap_perfmon,cap_net_raw,cap_sys_ptrace+ep ./bin/beyla BEYLA_OPEN_PORT=8080 BEYLA_TRACE_PRINTER=text bin/beyla ``` -------------------------------- ### Run Docker Compose and Generate Traces Source: https://grafana.com/docs/beyla/latest/setup/docker This command initiates the Docker Compose setup defined in 'compose-example.yml'. After running this command, you can interact with the instrumented application to generate traces, which will be processed and output by Grafana Beyla. ```bash docker compose -f compose-example.yml up ``` -------------------------------- ### Example Beyla Trace Output Source: https://grafana.com/docs/beyla/latest/setup/docker This is an example of the trace output you would see in the stdout of the Beyla container when it is instrumenting an HTTP service. It shows request details like time, method, path, status code, and size. ```text time=2023-05-22T14:03:42.402Z level=INFO msg="creating instrumentation pipeline" time=2023-05-22T14:03:42.526Z level=INFO msg="Starting main node" 2023-05-22 14:03:53.5222353 (19.066625ms[942.583µs]) 200 GET / [172.17.0.1]->[localhost:18443] size:0B 2023-05-22 14:03:53.5222353 (355.792µs[321.75µs]) 200 GET /static/style.css [172.17.0.1]->[localhost:18443] size:0B 2023-05-22 14:03:53.5222353 (170.958µs[142.916µs]) 200 GET /static/img.png [172.17.0.1]->[localhost:18443] size:0B 2023-05-22 14:13:47.52221347 (7.243667ms[295.292µs]) 200 GET /entry/201710281345_instructions.md [172.17.0.1]->[localhost:18443] size:0B 2023-05-22 14:13:47.52221347 (115µs[75.625µs]) 200 GET /static/style.css [172.17.0.1]->[localhost:18443] size:0B ``` -------------------------------- ### Beyla Service Selectors Configuration (YAML) Source: https://grafana.com/docs/beyla/latest/quickstart/kubernetes This snippet demonstrates how to configure Beyla service selectors in a YAML file to instrument processes based on open ports and executable path. It shows how to define multiple selector groups for targeted instrumentation. ```yaml discovery: instrument: # Instrument any process using the ports from 8080 to 8089 - open_ports: 8080-8089 # Instrument any process whose command line path contains "http" - exe_path: "*http*" # Instrument any process with a command line path containing "nginx" # and using the port 443 (both conditions must be fulfilled) - open_ports: 443 exe_path: "*nginx*" ``` -------------------------------- ### Create Kubernetes Namespace (Shell) Source: https://grafana.com/docs/beyla/latest/quickstart/kubernetes This command creates a dedicated Kubernetes namespace named 'beyla'. This namespace will be used to group all related permissions, configurations, and deployments for Grafana Beyla. ```shell kubectl create namespace beyla ``` -------------------------------- ### Set Capabilities and Start Beyla for App Observability with Context Propagation Source: https://grafana.com/docs/beyla/latest/security Configures Beyla to provide application observability with trace context propagation. This involves setting a comprehensive set of Linux capabilities and environment variables to enable advanced tracing features. ```shell sudo setcap cap_bpf,cap_dac_read_search,cap_perfmon,cap_net_raw,cap_sys_ptrace,cap_net_admin+ep ./bin/beyla BEYLA_ENABLE_CONTEXT_PROPAGATION=all BEYLA_OPEN_PORT=8080 BEYLA_TRACE_PRINTER=text bin/beyla ``` -------------------------------- ### Configure Beyla Routing with config.yml Source: https://grafana.com/docs/beyla/latest/quickstart/python This snippet demonstrates how to configure Beyla to heuristically group URL routes by creating a `config.yml` file and running Beyla with the configuration. ```yaml routes: unmatched: heuristic ``` ```bash sudo -E beyla -config config.yml ``` ```bash curl http://localhost:8080/foo curl http://localhost:8080/user/1234 curl http://localhost:8080/user/5678 ``` -------------------------------- ### Beyla Configuration YAML Example Source: https://grafana.com/docs/beyla/latest/configure/example This YAML configuration file demonstrates how to set up Grafana Beyla to send OpenTelemetry Traces (OTLP) data to a Grafana Cloud endpoint and expose Prometheus metrics. It includes settings for service discovery, eBPF configuration, and export endpoints. ```yaml discovery: instrument: - open_ports: 443 log_level: DEBUG ebf: wakeup_len: 100 otel_traces_export: endpoint: https://otlp-gateway-prod-eu-west-0.grafana.net/otlp prometheus_export: port: 8999 path: /metrics ``` -------------------------------- ### Set Capabilities and Start Beyla for Network Metrics (tc) Source: https://grafana.com/docs/beyla/latest/security Configures Beyla to capture network metrics using traffic control (tc) by setting required Linux capabilities and environment variables. This method allows for detailed inspection of network traffic. ```shell sudo setcap cap_bpf,cap_net_admin,cap_perfmon+ep ./bin/beyla BEYLA_NETWORK_METRICS=1 BEYLA_NETWORK_PRINT_FLOWS=1 BEYLA_NETWORK_SOURCE=tc bin/beyla ``` -------------------------------- ### Run Beyla with Configuration and Test Routes Source: https://grafana.com/docs/beyla/latest/quickstart/golang This snippet demonstrates how to run the Beyla service with a custom configuration file and subsequently test different routes using cURL. This allows for observing how Beyla heuristically groups traces for similar URL paths, such as `/user/*`. ```shell sudo -E beyla -config config.yml curl http://localhost:8080/foo curl http://localhost:8080/user/1234 curl http://localhost:8080/user/5678 ``` -------------------------------- ### Example Network Flow Log Output Source: https://grafana.com/docs/beyla/latest/network/quickstart This is an example of the network flow data captured by Beyla and printed to standard output when configured with `print_flows: true`. It illustrates the detailed information provided, including IP addresses, interfaces, and Kubernetes metadata. ```text network_flow: beyla.ip=172.18.0.2 iface= direction=255 src.address=10.244.0.4 dst.address=10.96.0.1 src.name=local-path-provisioner-7577fdbbfb-g6b7d dst.name=kubernetes k8s.src.node.name=kind-control-plane k8s.dst.namespace=default k8s.dst.name=kubernetes k8s.dst.owner.type=Service k8s.src.namespace=local-path-storage k8s.src.name=local-path-provisioner-7577fdbbfb-g6b7d k8s.src.type=Pod k8s.src.owner.name=local-path-provisioner k8s.src.owner.type=Deployment k8s.dst.type=Service k8s.dst.owner.name=kubernetes ``` -------------------------------- ### Custom Beyla Configuration with Helm Source: https://grafana.com/docs/beyla/latest/setup/kubernetes-helm Overrides the default Beyla configuration using a custom YAML file. This example shows how to specify which namespaces Beyla should instrument and how to configure route matching. The custom configuration is then applied using the '-f' flag during Helm installation or upgrade. ```yaml config: data: # Contents of the actual Beyla configuration file discovery: instrument: - k8s_namespace: demo - k8s_namespace: blog routes: unmatched: heuristic ``` -------------------------------- ### Configure Beyla Attribute Selection with Wildcards Source: https://grafana.com/docs/beyla/latest/configure/metrics-traces-attributes Illustrates the use of wildcards in Beyla's attribute configuration to manage groups of metrics. This example shows how to include all attributes for metrics starting with `http_` but exclude specific ones, and then provides overrides for `http_client_*` and `http_server_*` metrics. ```yaml attributes: select: http_*: include: ["*"] exclude: ["http_path", "http_route"] http_client_*: # override http_* exclusion include: ["http_path"] http_server_*: # override http_* exclusion include: ["http_route"] ``` -------------------------------- ### Run Instrumentable Rust Service and Compile Source: https://grafana.com/docs/beyla/latest/quickstart/rust This snippet downloads a sample Rust HTTP service, compiles it using rustc, and then runs the compiled executable. This prepares a service to be instrumented by Beyla. ```shell curl -OL https://raw.githubusercontent.com/grafana/beyla/main/examples/quickstart/rust/quickstart.rs rustc quickstart.rs && ./quickstart ``` -------------------------------- ### Set Capabilities and Run Beyla for Network Metrics Source: https://grafana.com/docs/beyla/latest/security This shell command sequence first uses `setcap` to grant Beyla the necessary `CAP_BPF` and `CAP_NET_RAW` capabilities for network observability via socket filters, then launches Beyla with relevant environment variables. ```shell sudo setcap cap_bpf,cap_net_raw+ep ./bin/beyla BEYLA_NETWORK_METRICS=1 BEYLA_NETWORK_PRINT_FLOWS=1 bin/beyla ``` -------------------------------- ### Run Beyla with Grafana Cloud Configuration Source: https://grafana.com/docs/beyla/latest/quickstart/java This snippet demonstrates how to configure and run Beyla, a Go-based observability tool, to instrument a Java service. It includes setting environment variables for Grafana Cloud's OpenTelemetry endpoint and authentication, and enabling trace printing for local debugging. Beyla requires administrative privileges. ```shell export BEYLA_OPEN_PORT=8080 export BEYLA_TRACE_PRINTER=text export OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf" export OTEL_EXPORTER_OTLP_ENDPOINT="https://otlp-gateway-prod-eu-west-0.grafana.net/otlp" export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Basic ...your-encoded-credentials..." sudo -E beyla ``` -------------------------------- ### Install Grafana Alloy Helm Chart in Kubernetes Source: https://grafana.com/docs/beyla/latest/setup/helm-alloy Installs the Grafana Alloy Helm chart into the 'alloy' namespace in your Kubernetes cluster. This command sets up Grafana Alloy, which includes Beyla for application instrumentation. ```bash helm install --namespace alloy alloy grafana/alloy ``` -------------------------------- ### Deploy Beyla with Configuration (YAML) Source: https://grafana.com/docs/beyla/latest/quickstart/kubernetes This YAML defines a Kubernetes ConfigMap for Beyla's configuration and a DaemonSet to deploy Beyla pods. The ConfigMap specifies settings like enabling Kubernetes discovery and filtering discovery to the 'docs' deployment. The DaemonSet ensures Beyla runs on each node, using the 'beyla' ServiceAccount and mounting the configuration. ```yaml apiVersion: v1 kind: ConfigMap metadata: namespace: beyla name: beyla-config data: beyla-config.yml: | # this is required to enable kubernetes discovery and metadata attributes: kubernetes: enable: true # this will provide automatic routes report while minimizing cardinality routes: unmatched: heuristic # let's instrument only the docs server discovery: instrument: - k8s_deployment_name: "docs" # uncomment the following line to also instrument the website server # - k8s_deployment_name: "website" --- apiVersion: apps/v1 kind: DaemonSet metadata: namespace: beyla name: beyla spec: selector: matchLabels: instrumentation: beyla template: metadata: labels: instrumentation: beyla spec: serviceAccountName: beyla hostPID: true # mandatory! containers: - name: beyla image: grafana/beyla:latest imagePullPolicy: IfNotPresent securityContext: privileged: true # mandatory! readOnlyRootFilesystem: true volumeMounts: - mountPath: /config name: beyla-config - mountPath: /var/run/beyla name: var-run-beyla env: - name: BEYLA_CONFIG_PATH value: "/config/beyla-config.yml" - name: OTEL_EXPORTER_OTLP_ENDPOINT valueFrom: secretKeyRef: name: grafana-credentials key: otlp-endpoint - name: OTEL_EXPORTER_OTLP_HEADERS valueFrom: secretKeyRef: name: grafana-credentials key: otlp-headers volumes: - name: beyla-config configMap: name: beyla-config - name: var-run-beyla emptyDir: {} ``` -------------------------------- ### Pull Beyla Docker Image Source: https://grafana.com/docs/beyla/latest/setup/docker This snippet shows how to pull the latest Grafana Beyla Docker image from Docker Hub. Ensure you have Docker installed and configured to use this command. ```bash docker pull grafana/beyla:latest ``` -------------------------------- ### Configure AKS for Beyla Performance Monitoring Source: https://grafana.com/docs/beyla/latest/security This snippet shows how to create a configuration file to set sysctl parameters for an AKS node, specifically adjusting `kernel.sys_paranoid` to '1' to allow Beyla to use `CAP_PERFMON` for performance monitoring. ```json { "sysctls": { "kernel.sys_paranoid": "1" } } ``` -------------------------------- ### Add Grafana Helm Repository Source: https://grafana.com/docs/beyla/latest/setup/kubernetes-helm Adds the Grafana Helm chart repository to your local Helm configuration. This is a prerequisite for installing any Grafana Helm charts, including Beyla. This command fetches the chart metadata from the specified URL. ```sh helm repo add grafana https://grafana.github.io/helm-charts ``` -------------------------------- ### Filter by Kubernetes Pod Annotations Source: https://grafana.com/docs/beyla/latest/configure/service-discovery Limits instrumentation to Pods with annotations matching the provided glob value. Example: discovering Pods in the 'backend' namespace with the annotation 'beyla.instrument' matching 'true'. Processes must also satisfy other selectors. ```yaml discovery: instrument: - k8s_namespace: backend k8s_pod_annotations: beyla.instrument: "true" ``` -------------------------------- ### Filter by Kubernetes Pod Labels Source: https://grafana.com/docs/beyla/latest/configure/service-discovery Instruments applications within Pods that have labels matching the specified glob value. Example: discovering Pods in the 'frontend' namespace with the label 'instrument' matching 'beyla'. Processes must also meet other selectors. ```yaml discovery: instrument: - k8s_namespace: frontend k8s_pod_labels: instrument: beyla ``` -------------------------------- ### Filter Network Metrics by Destination Port and Transport Protocol (YAML) Source: https://grafana.com/docs/beyla/latest/configure/filter-metrics-traces This example shows how to configure Beyla to filter network metrics. It specifically targets connections to destination port 53 while excluding any metrics associated with the UDP transport protocol. ```YAML filter: network: transport: not_match: UDP dst_port: match: "53" ``` -------------------------------- ### Deploy Sample Microservices for Beyla Trace-Context Propagation Source: https://grafana.com/docs/beyla/latest/cilium-compatibility This YAML definition deploys a set of sample microservices (Node.js, Go, Python, Rails) designed to test Grafana Beyla's trace-context propagation capabilities. These services communicate with each other, allowing observation of distributed tracing in action. ```yaml apiVersion: apps/v1 kind: Deployment metadata: name: nodejs-deployment labels: app: node spec: replicas: 1 selector: matchLabels: app: node template: metadata: labels: app: node spec: containers: - name: node image: ghcr.io/grafana/beyla-test/nodejs-testserver ports: - containerPort: 3030 hostPort: 3030 --- apiVersion: v1 kind: Service metadata: name: node-service spec: type: NodePort selector: app: node ports: - name: node protocol: TCP port: 30030 targetPort: 3030 nodePort: 30030 --- apiVersion: apps/v1 kind: Deployment metadata: name: go-deployment labels: app: go-testserver spec: replicas: 1 selector: matchLabels: app: go-testserver template: metadata: labels: app: go-testserver spec: containers: - name: go-testserver image: ghcr.io/grafana/beyla-test/go-testserver ports: - containerPort: 8080 hostPort: 8080 --- apiVersion: v1 kind: Service metadata: name: testserver spec: type: NodePort selector: app: go-testserver ports: - name: go-testserver protocol: TCP port: 8080 targetPort: 8080 --- apiVersion: apps/v1 kind: Deployment metadata: name: python-deployment labels: app: python-testserver spec: replicas: 1 selector: matchLabels: app: python-testserver template: metadata: labels: app: python-testserver spec: containers: - name: python-testserver image: ghcr.io/grafana/beyla-test/python-testserver ports: - containerPort: 8083 hostPort: 8083 --- apiVersion: v1 kind: Service metadata: name: pytestserver spec: type: NodePort selector: app: python-testserver ports: - name: python-testserver protocol: TCP port: 8083 targetPort: 8083 --- apiVersion: apps/v1 kind: Deployment metadata: name: rails-deployment labels: app: rails-testserver spec: replicas: 1 selector: matchLabels: app: rails-testserver template: metadata: labels: app: rails-testserver spec: containers: - name: rails-testserver image: ghcr.io/grafana/beyla-test/rails-testserver ports: - containerPort: 3040 hostPort: 3040 --- apiVersion: v1 kind: Service metadata: name: utestserver spec: type: NodePort selector: app: rails-testserver ports: - name: rails-testserver protocol: TCP port: 3040 targetPort: 3040 ```