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.
- Zarf binary installed on your $PATH: (Installing Zarf)
- An initialized cluster
- The WordPress package created
-
Use the
zarf package deploy
command to deploy the package you built in a the previous tutorial (see prerequisites). -
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
thenenter
and input a value for each variable when prompted followed byenter
for them as well. -
Because we included the connect services in the previous tutorial we can quickly test our package in a browser with
zarf connect wordpress-blog
. -
We can also explore the resources deployed by our package by running the
zarf tools monitor
command to startk9s
. Once you are done, hitctrl/control c
to exit.
- 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.
- Use the
zarf package remove
command to remove thewordpress
package. Don’t forget the--confirm
flag. Otherwise you’ll receive an error.
- 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.