# How to package a KUDO operator
In order to distribute a KUDO operator the files are packaged together in a compressed tarball. The KUDO CLI provides a mechanism to create this package format while verifying the integrity of the operator.
# Preconditions
A KUDO operator has been created. This runbook uses the first-operator operator (opens new window) as defined in the operators github repository (opens new window). It is expected that the working directory is from the base of the operator project.
tree
command is installed (used for confirmation only)
# Steps
# Package KUDO Operator
rm -rf ~/repo
mkdir -p ~/repo
kubectl kudo package create repository/first-operator/operator/ --destination=~/repo
Potential Data Loss
You may want to check the contents of the ~/repo
folder prior to deleting it.
The output looks like:
kubectl kudo package create repository/first-operator/operator/ --destination=~/repo
package is valid
Package created: /Users/kensipe/repo/first-operator-0.2.0.tgz
# Check to see the operator is built
ls ~/repo
first-operator-0.2.0.tgz