Grafana Alloy (Workload) Installation
This content is not available in your language yet.
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.
-
Connect to
🟢 ManagementKubernetes Cluster ; i.e w/ Kubeconfig FileEnsure you have defined and loaded your Global Shell Variables as described in Shell Variables.
Terminal window source $HOME/opstella-installation/shell-values/kubernetes/management_cluster.vars.shsource $HOME/opstella-installation/shell-values/tools/observability.vars.shTerminal window export KUBECONFIG="$HOME/opstella-installation/kubeconfigs/management_cluster.yaml" -
Set
🟢 ManagementKubernetes Cluster InformationEnsure
K8S_INTERNAL_DOMAIN,K8S_INGRESSCLASS_NAME,K8S_STORAGECLASS_NAMEare defined as per the Shell Variables guide. -
Create Kubernetes Secret for 🛡️ TLS Certificate for Grafana Alloy (Workload) in Namespace
observability-system.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"Create 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-system💡 Should return
secret/wildcard-${BASE_DOMAIN}-tls createdmessage.
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 > $HOME/opstella-installation/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 > $HOME/opstella-installation/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 WorkloadSet Domain for Grafana Alloy
export GRAFANA_ALLOY_WORKLOAD_DOMAIN="alloy-nonprod.${BASE_DOMAIN}"Terminal window kubectl apply --namespace observability-agents -f - <<EOFapiVersion: 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 WorkloadSet Domain for Grafana Alloy
export GRAFANA_ALLOY_WORKLOAD_DOMAIN="alloy-prod.${BASE_DOMAIN}"Terminal window kubectl apply --namespace observability-agents -f - <<EOFapiVersion: 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 export KUBECONFIG="$HOME/opstella-installation/kubeconfigs/nonprod_cluster.yaml" -
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 export KUBECONFIG="$HOME/opstella-installation/kubeconfigs/prod_cluster.yaml" -
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