Skip to main content

Deploying on Kubernetes

Follow the instructions below to deploy the agent on your Kubernetes cluster.

Create a config file as described in the previous section, and name it pulse-agent-config.yml. Then create a secret from it:

# Create a new secret named pulse-agent-config with local file pulse-agent-config.yml as the config.yml
kubectl create secret generic pulse-agent-config --from-file=config.yml=pulse-agent-config.yml

Now create the deployment spec in a separate file called pulse-deployment.yaml.

apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: pulse-agent
name: pulse-agent
spec:
replicas: 1
revisionHistoryLimit: 2
selector:
matchLabels:
app: pulse-agent
template:
metadata:
labels:
app: pulse-agent
spec:
automountServiceAccountToken: false
containers:
- image: r.bigdataboutique.com/pulse-agent
imagePullPolicy: Always
name: pulse-agent
env:
- name: PULSE_ENVIRONMENT_NAME
value: my-environment
- name: PULSE_AGENT_HEAP_SIZE
value: 2G
resources:
limits:
cpu: "1"
memory: 16Gi
requests:
cpu: 100m
memory: 2Gi
livenessProbe:
httpGet:
path: /healthz
port: 8080
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 1
readinessProbe:
httpGet:
path: /healthz
port: 8080
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 1
volumeMounts:
- mountPath: /etc/pulse-agent
name: config
readOnly: true
dnsPolicy: ClusterFirst
restartPolicy: Always
volumes:
- name: config
secret:
defaultMode: 420
secretName: pulse-agent-config

Finally, apply the spec:

kubectl apply -f pulse-deployment.yaml