Skip to content

Deploying Local Zarf Packages

In this tutorial, we are going to deploy the WordPress package onto your cluster using the package we created in the earlier create a package tutorial and the cluster we initialized in the initialize a k8s cluster tutorial. We will be leveraging that past work to go the extra step of deploying an application we packaged onto our cluster with the zarf package deploy command.

  • You’ll need a machine that has access to a built-package and an initialized cluster.

Prior to this tutorial you’ll want to have a built package and a working cluster with Zarf initialized.

  1. Use the zarf package deploy command to deploy the package you built in a the previous tutorial (see prerequisites).

  2. You will be presented with a chance to review the SBOMs for the package along with its definition followed by a series of prompts for each variable we setup in the previous tutorial. To confirm package deployment press y then enter and input a value for each variable when prompted followed by enter for them as well.

  3. Because we included the connect services in the previous tutorial we can quickly test our package in a browser with zarf connect wordpress-blog.

    Zarf Connect WordPress

  4. We can also explore the resources deployed by our package by running the zarf tools monitor command to start k9s. Once you are done, hit ctrl/control c to exit.

    Zarf Tools Monitor

  1. Use the zarf package list command to get a list of the installed packages. This will give you the name of the WordPress package to remove it.
  1. Use the zarf package remove command to remove the wordpress package. Don’t forget the --confirm flag. Otherwise you’ll receive an error.
  1. You can also use the zarf package remove command with the zarf package file, to remove the package. Again, don’t forget the --confirm flag.

The wordpress package has now been removed from your cluster.