Running pods during collection time to create data
run collector can be used to run a pod in the cluster with the parameters provided.
The collector will delete and clean up this pod and any artifacts after it's created.
This collector can be included multiple times, each defining different commands to run.
In addition to the shared collector properties, the
run collector accepts the following parameters:
The name of the collector. This will be map to the path that the output is written to in the support bundle. If name is not provided, it will default to a calculated and deterministic value that is made from the label selector and the command.
The namespace to look for the pod selector in. If not specified, it will assume the "current" namespace that the kubectl context is set to.
The image to run when starting the pod. This should be accessible to the nodes in the cluster (public or private with an imagePullSecret). The collector does automatically provide access to private images.
An array of strings containing the command to use when starting the pod.
An array of strings containing the arguments to pass to the command when starting.
A duration that will be honored when running the pod. This cannot be greater than 30 seconds (30s) and if not specified, the default is 20s.
A valid, string representation of the pull policy to use when delivering the image the nodes. If not specified, this will be set to IfNotPresent.
apiVersion: troubleshoot.replicated.com/v1beta1 kind: Collector metadata: name: sample spec: collectors: - run: collectorName: "run-ping" image: busybox:1 namespace: default command: ["ping"] args: ["-w", "5", "www.google.com"] imagePullPolicy: IfNotPresent
When this collector is executed, it will include the following files in a support bundle:
This will contain the pod output (up to 10000 lines).