This is the Stable version of the documentation. The latest version is experimental and under active development. You can use the version selector in the top-right menu to switch versions for this specific page, or click here to go to the latest version's homepage.
Grafana Alloy (Workload) Installation
Grafana Alloy (Workload) is a Metrics/Logs/Traces Gathering from Opstella-managed Application (OpenTelemetry Enabled Applications)
Prerequisites
Section titled “Prerequisites”Kubernetes Cluster
Section titled “Kubernetes Cluster”Grafana Alloy (Workload) will be installed on 🟦 Non-Production Workload and 🟥 Production Workload Kubernetes Cluster
- 📥Ingress Service provided as Kubernetes Ingress Class (
IngressClass) - 🛡️TLS Certificate for Grafana Alloy (Workload) provided as Kubernetes Secret
- Grafana Alloy (Workload) will be exposed as HTTPS with Kubernetes Ingress.
Complete Prerequisites
Section titled “Complete Prerequisites”Kubernetes Cluster
Section titled “Kubernetes Cluster”Prepare Shell Variables
Section titled “Prepare Shell Variables”Ensure you have defined and loaded your Global Shell Variables as described in Shell Variables.
-
Prepare Shell Variables for Grafana Alloy (Workload)
Ensure you have defined and loaded your Global Shell Variables as described in Shell Variables.
Terminal window source $HOME/opstella-installation/shell-values/tools/observability.vars.sh -
Set Workload Kubernetes Cluster Information
Ensure
K8S_INTERNAL_DOMAIN,K8S_INGRESSCLASS_NAME,K8S_STORAGECLASS_NAMEare defined as per the Shell Variables guide, for EACH of🟦 Non-Production Workloadand🟥 Production WorkloadKubernetes Cluster(s). -
Set Kubernetes Secret Name for 🛡️ TLS Certificate for Grafana Alloy (Workload)
Kubernetes Ingress for Grafana Alloy (Workload) will associate TLS Certificate with Kubernetes Secret named
wildcard-${BASE_DOMAIN}-tls.export K8S_INGRESS_TLS_CERTIFICATE_SECRET_NAME="wildcard-${BASE_DOMAIN}-tls"
Pre-Installation
Section titled “Pre-Installation”Grafana Alloy (Workload) Preparation
Section titled “Grafana Alloy (Workload) Preparation”-
Create Helm Values Configuration, create for
🟦 Non-Production WorkloadKubernetes ClusterTerminal window cat <<EOF > $BASE_WORKING_DIR/helm-values/grafana-alloy-workload-nonprod-full-values.yaml## Global properties for image pulling override the values defined under 'image.registry' and 'configReloader.image.registry'.## If you want to override only one image registry, use the specific fields but if you want to override them all, use 'global.image.registry'global:# -- Security context to apply to the Grafana Alloy pod.podSecurityContext:fsGroup: 473# Options for the extra controller used for config reloading.configReloader:securityContext:runAsUser: 473runAsGroup: 473runAsNonRoot: trueprivileged: falseallowPrivilegeEscalation: falsecapabilities:drop: ["ALL"]seccompProfile:type: "RuntimeDefault"# Options for the extra controller used for config reloading.alloy:## OPSTELLA_CUSTOMIZE: SecuityContextsecurityContext:runAsUser: 473runAsGroup: 473runAsNonRoot: trueprivileged: falseallowPrivilegeEscalation: falsecapabilities:drop: ["ALL"]seccompProfile:type: "RuntimeDefault"configMap:create: true## OPSTELLA_CUSTOMIZE: Enable Alloy Clusteringclustering:# -- Deploy Alloy in a cluster to allow for load distribution.enabled: true## OPSTELLA_CUSTOMIZE: Enable Alloy to be OTel gRPC ReceiverextraPorts:- name: otlp-grpcport: 4317targetPort: 4317protocol: "TCP"EOF -
Create Helm Values Configuration, create for
🟥 Production WorkloadKubernetes ClusterTerminal window cat <<EOF > $BASE_WORKING_DIR/helm-values/grafana-alloy-workload-prod-full-values.yaml## Global properties for image pulling override the values defined under 'image.registry' and 'configReloader.image.registry'.## If you want to override only one image registry, use the specific fields but if you want to override them all, use 'global.image.registry'global:# -- Security context to apply to the Grafana Alloy pod.podSecurityContext:fsGroup: 473# Options for the extra controller used for config reloading.configReloader:securityContext:runAsUser: 473runAsGroup: 473runAsNonRoot: trueprivileged: falseallowPrivilegeEscalation: falsecapabilities:drop: ["ALL"]seccompProfile:type: "RuntimeDefault"# Options for the extra controller used for config reloading.alloy:## OPSTELLA_CUSTOMIZE: SecuityContextsecurityContext:runAsUser: 473runAsGroup: 473runAsNonRoot: trueprivileged: falseallowPrivilegeEscalation: falsecapabilities:drop: ["ALL"]seccompProfile:type: "RuntimeDefault"configMap:create: true## OPSTELLA_CUSTOMIZE: Enable Alloy Clusteringclustering:# -- Deploy Alloy in a cluster to allow for load distribution.enabled: true## OPSTELLA_CUSTOMIZE: Enable Alloy to be OTel gRPC ReceiverextraPorts:- name: otlp-grpcport: 4317targetPort: 4317protocol: "TCP"EOF -
Create Kubernetes Manifest Configuration for Grafana Alloy Health Checking for
🟦 Non-Production WorkloadLoad
🟦 Non-Production WorkloadKubernetes Cluster Shell Variables first, so the Ingress is rendered with ITSK8S_INGRESSCLASS_NAMETerminal window source $HOME/opstella-installation/shell-values/kubernetes/nonprod_cluster.vars.shSet Domain for Grafana Alloy
export GRAFANA_ALLOY_WORKLOAD_DOMAIN="alloy-nonprod.${BASE_DOMAIN}"Terminal window cat <<EOF > $BASE_WORKING_DIR/kubernetes-manifests/grafana-alloy-nonprod-healthcheck-ingress.yamlapiVersion: networking.k8s.io/v1kind: Ingressmetadata:name: grafana-alloy-workload-healthchecknamespace: observability-agentsannotations:nginx.ingress.kubernetes.io/rewrite-target: /-/readyspec:ingressClassName: ${K8S_INGRESSCLASS_NAME}tls:- secretName: ${K8S_INGRESS_TLS_CERTIFICATE_SECRET_NAME}rules:- host: ${GRAFANA_ALLOY_WORKLOAD_DOMAIN}http:paths:- path: /workload/readypathType: ImplementationSpecificbackend:service:name: grafana-alloy-workloadport:number: 12345EOF -
Create Kubernetes Manifest Configuration for Grafana Alloy Health Checking for
🟥 Production WorkloadLoad
🟥 Production WorkloadKubernetes Cluster Shell Variables first, so the Ingress is rendered with ITSK8S_INGRESSCLASS_NAMETerminal window source $HOME/opstella-installation/shell-values/kubernetes/prod_cluster.vars.shSet Domain for Grafana Alloy
export GRAFANA_ALLOY_WORKLOAD_DOMAIN="alloy-prod.${BASE_DOMAIN}"Terminal window cat <<EOF > $BASE_WORKING_DIR/kubernetes-manifests/grafana-alloy-prod-healthcheck-ingress.yamlapiVersion: networking.k8s.io/v1kind: Ingressmetadata:name: grafana-alloy-workload-healthchecknamespace: observability-agentsannotations:nginx.ingress.kubernetes.io/rewrite-target: /-/readyspec:ingressClassName: ${K8S_INGRESSCLASS_NAME}tls:- secretName: ${K8S_INGRESS_TLS_CERTIFICATE_SECRET_NAME}rules:- host: ${GRAFANA_ALLOY_WORKLOAD_DOMAIN}http:paths:- path: /workload/readypathType: ImplementationSpecificbackend:service:name: grafana-alloy-workloadport:number: 12345EOF
Installation
Section titled “Installation”-
Connect to
🟦 Non-Production WorkloadKubernetes Cluster ; i.e w/ Kubeconfig FileTerminal window source $HOME/opstella-installation/shell-values/kubernetes/nonprod_cluster.vars.shexport KUBECONFIG="$HOME/opstella-installation/kubeconfigs/nonprod_cluster.yaml" -
Create Kubernetes Secret for 🛡️ TLS Certificate for Grafana Alloy (Workload) in Namespace
observability-agentson🟦 Non-Production WorkloadCreate one using from
.crtand.keyfile.Terminal window kubectl create secret tls $K8S_INGRESS_TLS_CERTIFICATE_SECRET_NAME \--cert=/path/to/cert/file --key=/path/to/key/file \--namespace observability-agents💡 Should return
secret/wildcard-${BASE_DOMAIN}-tls createdmessage. -
Install Grafana Alloy (Workload) on
🟦 Non-Production Workload-
Install a Helm Release with specific Helm Chart Version
--version 0.12.3(App Version: v1.7.2)Terminal window helm install grafana-alloy-workload grafana/alloy --version 0.12.3 \--namespace observability-agents \-f $HOME/opstella-installation/helm-values/grafana-alloy-workload-nonprod-full-values.yaml
-
-
Apply Kubernetes Manifest on
🟦 Non-Production WorkloadTerminal window kubectl apply -f $HOME/opstella-installation/kubernetes-manifests/grafana-alloy-nonprod-healthcheck-ingress.yaml -
Connect to
🟥 Production WorkloadKubernetes Cluster ; i.e w/ Kubeconfig FileTerminal window source $HOME/opstella-installation/shell-values/kubernetes/prod_cluster.vars.shexport KUBECONFIG="$HOME/opstella-installation/kubeconfigs/prod_cluster.yaml" -
Create Kubernetes Secret for 🛡️ TLS Certificate for Grafana Alloy (Workload) in Namespace
observability-agentson🟥 Production WorkloadCreate one using from
.crtand.keyfile.Terminal window kubectl create secret tls $K8S_INGRESS_TLS_CERTIFICATE_SECRET_NAME \--cert=/path/to/cert/file --key=/path/to/key/file \--namespace observability-agents💡 Should return
secret/wildcard-${BASE_DOMAIN}-tls createdmessage. -
Install Grafana Alloy (Workload) on
🟥 Production WorkloadTerminal window helm install grafana-alloy-workload grafana/alloy --version 0.12.3 \--namespace observability-agents \-f $HOME/opstella-installation/helm-values/grafana-alloy-workload-prod-full-values.yaml -
Apply Kubernetes Manifest on
🟥 Production WorkloadTerminal window kubectl apply -f $HOME/opstella-installation/kubernetes-manifests/grafana-alloy-prod-healthcheck-ingress.yaml
Post-Installation
Section titled “Post-Installation”Grafana Alloy (Workload) Testing
Section titled “Grafana Alloy (Workload) Testing”-
Get Pods Status
Terminal window kubectl get pods -n observability-agentsGrafana Alloy should be
RunningNAME READY STATUS RESTARTS AGE... (deducted)grafana-alloy-workload-0 1/1 Running 0 Xdgrafana-alloy-workload-1 1/1 Running 0 Xdgrafana-alloy-workload-2 1/1 Running 0 Xd
Finished?
Use the below navigation to proceed