• Print
  • Share
  • Dark
    Light

PHP APM with Kubernetes

  • Updated on 12 Nov 2018
  • 1 minute to read
  • Contributors

Setting up the Stackify PHP Profiler with Kubernetes requires a few adjustments to the standard installation instructions found in the Getting Started guide.

Step 1

The Linux Agent is required to be installed on all Kubernetes machines. Pods/Containers will communicate to the Linux Agent through a shared volume detailed below.

Follow the Linux Agent Install Guide with Docker Guide.

Step 2

Modify container configuration to include the PHP Profiler.

Follow the PHP APM with Docker Guide.

Step 3

Setting up a shared volume in Kubernetes varies from the docker container setup guidelines.

Modify your pod configuration to include stackify-volume:

apiVersion: v1
kind: Pod
metadata:
  name: pod-name
spec:
  containers:
  - name: app-name
    image: image-name:tag
    ports:
      - containerPort: 8080
    securityContext:
      privileged: true
    volumeMounts:
      - name: stackify-volume
        mountPath: "/usr/local/stackify"
  volumes:
    - name: stackify-volume
    	hostPath:
      	  path: "/usr/local/stackify"

Verify

Startup your PHP application pod/container and make requests. You can then verify results in the Retrace dashboard.

Additional Guides

Was this article helpful?