Skip to main content

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. Three default options for this command are <REGISTRY|LOGGING|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 | LOGGING | 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
--namespace string Specify the namespace. E.g. namespace=default (default "zarf")
--remote-port int Specify the remote port of the resource to bind to. E.g. remote-port=8080
--type string Specify the resource type. E.g. type=svc or type=pod (default "svc")

Options inherited from parent commands

  -a, --architecture string   Architecture for OCI images and Zarf packages
--insecure Allow access to insecure registries and disable other recommended security enforcements such as package checksum and signature validation. This flag should only be used if you have a specific reason and accept the reduced security posture.
-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
--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