kube inject

Description

Inject Akita into a Kubernetes deployment, or set of deployments, and output the result to standard out or a file.

Examples

Inject the set of Deployment manifests found in resources.yml and print the result to standard out. Each injected deployment should send traffic to the “akibox” Akita project.

akita kube inject -p akibox -f resources.yml

Inject any Deployment manifests found in resources.yml similar to the previous execution. Also generate and add any Secrets required for the Akita Agent to run.

akita kube inject -s -p akibox -f resources.yml

Inject resources.yml and output the result to out.yml, and also generate and merge any required Secret manifests:

akita kube inject -s -f resources.yml -o out.yml

Output injected resources and any Secret manifests to separate files:

akita kube inject -s="secret.yml" -f in.yml -o out.yml

Apply generated resources via pipe using kubectl:

akita kube inject -s -f in.yml | kubectl apply -f -

Required Flags

-f, --file string

Path to the Kubernetes YAML file to be injected. This should contain a valid Deployment manifest.

-p, --project string

Name of the Akita project to which the traffic will be uploaded.

Optional Flags

-o, --output string

Path to the output file. If not specified, the output will be printed to stdout.

-s, --secret string[="true"]

Whether to generate a Kubernetes Secret manifest. If set to “true”, the secret will be added 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”)

Notes

  • The input file must be in YAML format and should contain at least one valid Deployment manifest.
  • If the --secret flag is set to a file path, the --output flag must also be set. If you would like to only generate a Secret manifest for your Akita credentials, please use kube secret.