Skip to content

zarf connect

zarf connect

Accesses services or pods deployed in the cluster

Synopsis

Uses a k8s port-forward to connect to resources within the cluster referenced by your kube-context. Two default options for this command are <REGISTRY|GIT>. These will connect to the Zarf created resources (assuming they were selected when performing the zarf init command).

Packages can provide service manifests that define their own shortcut connection options. These options will be printed to the terminal when the package finishes deploying. If you don’t remember what connection shortcuts your deployed package offers, you can search your cluster for services that have the ‘zarf.dev/connect-name’ label. The value of that label is the name you will pass into the ‘zarf connect’ command.

Even if the packages you deploy don’t define their own shortcut connection options, you can use the command flags to connect into specific resources. You can read the command flag descriptions below to get a better idea how to connect to whatever resource you are trying to connect to.

zarf connect { REGISTRY | GIT | connect-name } [flags]

Options

--cli-only Disable browser auto-open
-h, --help help for connect
--local-port int (Optional, autogenerated if not provided) Specify the local port to bind to. E.g. local-port=42000.
--name string Specify the resource name. E.g. name=unicorns or name=unicorn-pod-7448499f4d-b5bk6. Ignored if connect-name is supplied.
--namespace string Specify the namespace. E.g. namespace=default. Ignored if connect-name is supplied. (default "zarf")
--remote-port int Specify the remote port of the resource to bind to. E.g. remote-port=8080. Ignored if connect-name is supplied.
--type string Specify the resource type. E.g. type=svc or type=pod. Ignored if connect-name is supplied. (default "svc")

Options inherited from parent commands

-a, --architecture string Architecture for OCI images and Zarf packages
--insecure-skip-tls-verify Skip checking server's certificate for validity. This flag should only be used if you have a specific reason and accept the reduced security posture.
--log-format string [beta] Select a logging format. Defaults to 'console'. Valid options are: 'console', 'json', 'dev'
-l, --log-level string Log level when running Zarf. Valid options are: warn, info, debug, trace (default "info")
--no-color Disable colors in output
--no-log-file Disable log file creation
--no-progress Disable fancy UI progress bars, spinners, logos, etc
--plain-http Force the connections over HTTP instead of HTTPS. This flag should only be used if you have a specific reason and accept the reduced security posture.
--tmpdir string Specify the temporary directory to use for intermediate files
--zarf-cache string Specify the location of the Zarf cache directory (default "~/.zarf-cache")

SEE ALSO