Docs » Get started with the Splunk Distribution of the OpenTelemetry Collector » Get started with the Collector for Kubernetes » Install the Collector for Kubernetes with YAML manifests

Install the Collector for Kubernetes with YAML manifests đź”—

You can also install the Splunk Distribution of the OpenTelemetry Collector for Kubernetes using resource YAML manifests.

Prerequisites đź”—

To specify the configuration, you need to know your Splunk realm and base64-encoded access token.

A configuration file can contain multiple resource manifests. Each manifest applies a specific state to a Kubernetes object. You must configure your manifests for Splunk Observability Cloud only and come with all telemetry types activated for the agent, which is the default if you install using the Helm chart.

Determine which manifest you want to use đź”—

Download the necessary manifest files from the examples repository . Refer to the README files for more details on each example.

Determine which Collector deployment modes you want to use, agent or gateway. By default, host monitoring (agent) mode is configured to send data directly to Splunk SaaS endpoints. Host monitoring (agent) mode can be reconfigured to send to a gateway.

Update the manifest đź”—

Once you’ve decided which manifest suits you better, make the following updates:

  1. In the secret.yaml manifest, update the splunk_observability_access_token data field with your base64-encoded access token.

  2. Update any configmap-agent.yaml, configmap-gateway.yaml, and configmap-cluster-receiver.yaml manifest files you use. Search for “CHANGEME” to find the values that must be updated to use the rendered manifests directly.
    1. You need to update “CHANGEME” in exporter configurations to the value of the Splunk realm.

    2. You need to update “CHANGEME” in attribute processor configurations to the value of the cluster name.

Apply the manifest đź”—

After you’ve updated them, apply the manifests using kubectl, as shown in the following examples.

For host monitoring (agent) mode, download the agent-only manifest directory on GitHub for pre-rendered Kubernetes resource manifests that can be applied using the kubectl apply command after being updated with your token, realm information, and cluster name:

kubectl apply -f <agent-manifest-directory> --recursive

For data forwarding (gateway) mode, download the gateway-only manifest directory on GitHub for pre-rendered Kubernetes resource manifests that can be applied using the kubectl apply command after being updated with your token, realm information, and cluster name:

kubectl apply -f <gateway-manifest-directory> --recursive

Use templates đź”—

You can create your own manifest YAML files with customized parameters using helm template command.

helm template --namespace default --set cloudProvider='aws' --set distribution='openshift' --set splunkObservability.accessToken='KUwtoXXXXXXXX' --set clusterName='my-openshift-EKS-dev-cluster' --set splunkObservability.realm='us1' --set gateway.enabled='false' --output-dir <rendered_manifests_dir> --generate-name splunk-otel-collector-chart/splunk-otel-collector

If you prefer, you can update the values.yaml file first.

helm template --namespace default --values values.yaml --output-dir <rendered_manifests_dir> --generate-name splunk-otel-collector-chart/splunk-otel-collector

Manifest files will be created in your specified folder <rendered_manifests_dir>.

Manifest examples đź”—

See the following manifest to set security constraints:

---
# Source: splunk-otel-collector/templates/securityContextConstraints.yaml
kind: SecurityContextConstraints
apiVersion: security.openshift.io/v1
metadata:
  name: default-splunk-otel-collector
  labels:
    app.kubernetes.io/name: splunk-otel-collector
    helm.sh/chart: splunk-otel-collector-0.113.0
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/instance: default
    app.kubernetes.io/version: "0.113.0"
    app: splunk-otel-collector
    chart: splunk-otel-collector-0.113.0
    release: default
    heritage: Helm
users:
- system:serviceaccount:default:default-splunk-otel-collector
allowHostDirVolumePlugin: true
allowHostIPC: false
allowHostNetwork: true
allowHostPID: true
allowHostPorts: true
allowPrivilegedContainer: false
allowedCapabilities: []
defaultAddCapabilities: []
fsGroup:
  type: RunAsAny
priority: 10
readOnlyRootFilesystem: true
requiredDropCapabilities:
- ALL
runAsUser:
  type: RunAsAny
seLinuxContext:
  seLinuxOptions:
    level: s0
    role: system_r
    type: spc_t
    user: system_u
  type: MustRunAs
supplementalGroups:
  type: RunAsAny
volumes:
- configMap
- downwardAPI
- emptyDir
- hostPath
- secret

Next steps đź”—

After installing the Collector you can:

This page was last updated on Jun 13, 2024.