kube inject command reference
The kube inject command injects the Postman Insights Agent into a Kubernetes deployment and output the result on the command line into a file. See Examples.
Flags
-h,--help- Help forinject.--host-allow strings- Allows only HTTP hosts matching regular expressions.--host-exclusions strings- Removes HTTP hosts matching regular expressions.--interfaces strings- List of network interfaces to listen on. Defaults to all interfaces on host.-f, --file string- Path to the Kubernetes YAML file to be injected. Expects to contain a valid deployment manifest. You can use-with the file name to read from standard input.--path-allow strings- Allows only HTTP paths matching regular expressions.--path-exclusions strings- Removes HTTP paths matching regular expressions.--rate-limit float- Number of requests per minute to capture.--repro-mode- Turns on Repro Mode to send request and response payloads to Postman.-o, --output string- Path to the output file. If not specified, the output prints tostdout.-s, --secret string[="true"]- Whether to generate a Kubernetes Secret. If set to"true", the agent adds the secret to the modified Kubernetes YAML file. Specify a path to write the secret to a separate file. If this is done, an output file must also be specified with--output. Default:"false".
Global flags
--log-format string- Set to'color','plain'or'json'to control the log format.--project string- Your Postman Insights project ID.--proxy string- The domain name, IP address, or URL of an HTTP proxy server to use.--repro-mode- Enable Repro Mode.
Notes:
-
The input file must be in YAML format and must contain at least one valid deployment manifest.
-
If the
--secretflag is set to a file path, the--outputflag must also be set.
Examples
-
Inject the set of deployment manifests found in
resources.ymland print the result to standard out. Each injected deployment will send traffic from the endpoint to the Postman Insights Agent. -
Inject any deployment manifests found in
resources.ymlsimilar to the previous run. Also generate and add any secrets required for the Insights Agent to run. -
Output injected resources and any secret manifests to separate files:
-
Apply generated resources through pipe using
kubectl: