Using Dev Clusters
Uffizzi dev clusters let you code locally in your favorite IDE and see your changes automatically reflected in your deployed services in real-time.
Dev clusters provide many benefits compared to traditional local development environments, including standardizing developer workflows and offloading compute to remote servers.
One of the primary benefits of using Uffizzi Dev Clusters is the option to use the Uffizzi Ingress service. With this option enabled, Uffizzi will provision for your dev environment its own URL (with a unique domain and TLS certificate), allowing you to test your application with HTTPS and enforce a more production-like configuration.
To create a dev cluster, you'll need two things:
skaffold.yaml(opens in a new tab) file
- Your application's configuration files - typically Helm Charts, kustomizations or Kubernetes manifests
uffizzi dev start /path/to/skaffold.yaml
This command will also save the location of your skaffold file in the CLI configuration
Uffizzi dev clusters require a
skaffold.yaml (opens in a new tab) configuration file
that defines how your build artifacts are managed and where to find your application configuration files, such as
Helm Charts or kustomizations.
If you've never used Skaffold before, don't worry. Despite the many configuration options available, most
are pretty simple. You can see an example Skaffold file here.
Once you have a valid skaffold file, you can create a dev clustering by running:
To stop the skaffold process, you can press
Ctrl+C, or if you started the dev cluser in quiet mode, run
uffizzi dev stop in another terminal. If you stop the skaffold process, it will halt file synchronization,
but it will not delete the dev cluster. To do that you can run
uffizzi dev delete, which will destroy the
entire dev cluster and all of its resources, including any persistent volumes you've created.
uffizzi dev command is a convenience wrapper around
uffizzi cluster and
skaffold dev (opens in a new tab) commands. It manages the lifecycle of Uffizzi
virutal clusters (creates, updates, and deletes necessary resources) and automatically configures Skaffold
for use with Uffizzi. Additionally,
uffizzi dev provides sensible default configurations, such as using Uffizzi Cloud's ephemeral registry
registry.uffizzi.com to temporarily store build artifacts. For a full list of command options, see the CLI reference.
Skaffold files are relatively simple files that at a minimum define
Most of the configuration happens in your Charts or manifests, not in the
skaffold.yaml file itself.
For example, this is the skaffold file we use for developing the Uffizzi Cloud platform, which despite
being comprised of a half a dozen services, is only about 20 lines of YAML:
apiVersion: skaffold/v4beta6 kind: Config build: artifacts: - image: uffizzi-platform context: . docker: dockerfile: Dockerfile sync: infer: - "**/*" manifests: helm: releases: - name: uffizzi chartPath: "charts/uffizzi-platform" skipBuildDependencies: true valuesFiles: - ".helm_values.yaml"