-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathocp-trace-pod.yaml
More file actions
41 lines (41 loc) · 1.07 KB
/
Copy pathocp-trace-pod.yaml
File metadata and controls
41 lines (41 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Privileged pod on a worker for node-level eBPF / block tracing.
# Image tag must match cluster OCP version (built with build.sh).
#
# Apply:
# OCP_VER=$(oc get clusterversion version -o jsonpath='{.status.desired.version}')
# NODE=$(oc get nodes -l node-role.kubernetes.io/worker -o jsonpath='{.items[0].metadata.name}')
# sed -e "s/OCP_VERSION/${OCP_VER}/" -e "s/NODE_NAME/${NODE}/" ocp-trace-pod.yaml | oc apply -f -
#
# Shell:
# oc rsh ocp-trace-node
# oc exec -it ocp-trace-node -- bash
#
apiVersion: v1
kind: Pod
metadata:
name: ocp-trace-node
labels:
app: ocp-trace
spec:
nodeName: NODE_NAME
hostPID: true
containers:
- name: ocp-trace
image: quay.io/rh_ee_lguoqing/ocp-trace:OCP_VERSION
imagePullPolicy: Always
command: ["sleep", "infinity"]
securityContext:
privileged: true
volumeMounts:
- name: host
mountPath: /host
- name: kernel-debug
mountPath: /sys/kernel/debug
volumes:
- name: host
hostPath:
path: /
- name: kernel-debug
hostPath:
path: /sys/kernel/debug
type: Directory