Kubernetes Install
  • Updated on 19 Nov 2019
  • 1 minute to read
  • Contributors
  • Print
  • Share
  • Dark
    Light

Kubernetes Install

  • Print
  • Share
  • Dark
    Light

This document details how to install Retrace in a Kubernetes environment.

Create a DaemonSet

The Stackify Retrace container will run as a DaemonSet to ensure that a single instance is running on each server.

Adjust the following configuration and deploy to your Kubernetes cluster.

stackify-retrace.yaml:

---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: stackify
  namespace: default
automountServiceAccountToken: true
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
  name: stackify
rules:
- apiGroups: [""]
  resources:
    - "pods"
    - "services"
  verbs: ["get", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
  name: stackify
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: stackify
subjects:
- kind: ServiceAccount
  name: stackify
  namespace: default
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: stackify-retrace
spec:
  selector:
    matchLabels:
      name: stackify-retrace
  template:
    metadata:
      labels:
        name: stackify-retrace
    spec:
      serviceAccountName: stackify
      containers:
        - name: stackify-retrace
          image: stackify/retrace
          securityContext:
            runAsUser: 0
          env:
            - name: STACKIFY_KEY
              value: "YOUR_ACTIVATION_KEY"
            - name: STACKIFY_ENV
              value: "YOUR_ENVIRONMENT_NAME"
            - name: STACKIFY_K8S_CLUSTER_NAME
              value: "YOUR_KUBERNETES_CLUSTER_NAME"
          volumeMounts:
            - name: hostfs
              mountPath: /hostfs
              readOnly: true
            - name: stackify
              mountPath: /var/stackify
              readOnly: false
      volumes:
        - name: hostfs
          hostPath:
            path: /
        - name: stackify
          hostPath:
            path: /var/stackify
            type: DirectoryOrCreate

Note: Replace YOUR_ACTIVATION_KEY, YOUR_ENVIRONMENT_NAME and YOUR_KUBERNETES_CLUSTER_NAME.

Troubleshooting

Google Cloud

Ensure that your user has permissions to create a ServiceAccount.

kubectl create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin --user $(gcloud config get-value account)

Kubernetes Version < 1.9

Set DaemonSet to use:

apiVersion: extensions/v1beta1

Application Setup

The following guides detail how to configure your application containers for APM.

Limitations

The following are known limitations of Retrace when using the Stackify Retrace container.

  • Apache/Nginx/Syslog Log Collectors are disabled
  • Auto Agent update is disabled
  • Agent restarting via Retrace is disabled
  • Server Service listing limited to SystemV (service status will be marked as UNKNOWN)
  • JMX MBeans is disabled
Was this article helpful?