This topic tells you how to get started with a typical installation of Tanzu Build Service (commonly known as TBS) and create an Image.

This topic serves as a quick-start guide and might not include some configurations required for your specific environment. For more information about installation, see Install Tanzu Build Service.


Before you install Build Service, you must:

  • Have access to the Kubernetes cluster satisfying the minimum required permissions.

  • Users must navigate to the following dependencies pages in Tanzu Network and accept all EULAs highlighted in yellow.

    1. Tanzu Build Service Dependencies
    2. Buildpacks for VMware Tanzu
    3. Stacks for VMware Tanzu
  • Ensure your Kubernetes cluster is configured with default StorageClass. Tanzu Build Service defaults to using 2G of cache if a default StorageClass is defined. Build Service utilizes PersistentVolumeClaims to cache build artifacts, which reduces the time of subsequent builds.

    For more information, see Persistent Volumes in the Kubernetes documentation. And for information on defining a default StorageClass, see Changing the default StorageClass

  • Download the Carvel CLI tools for your operating system. These tools will facilitate the installation of Tanzu Build Service on your cluster. They can be found on Tanzu Network under the Tanzu Cluster Essentials page. The download comes with four binaries that you will use:

    • kapp is a deployment tool that allows users to manage Kubernetes resources in bulk.
    • ytt is a templating tool that understands YAML structure. Version 0.35.0 or higher is required.
    • kbld is needed to map relocated images to k8s config.
    • imgpkg is tool that relocates container images and pulls the release configuration files. Version 0.12.0 or higher is required.
  • Find the latest Tanzu Build Service version by checking the Tanzu Build Service page on Tanzu Network. Just knowing the version is sufficient.

  • Download the kp CLI for your operating system from the Tanzu Build Service page on Tanzu Network. The kp CLI help text is published here.

    • These docs assume you are using kp CLI v0.10.x with Tanzu Build Service v1.10.x. If a feature is not working, you might need to upgrade your CLI.
  • Download either the docker CLI or crane CLI for authentication with registries.


For this example setup, we make the following assumptions:

  • You are installing TBS 1.10.3 (This is the latest version at the time of writing. Go to the Tanzu Build Service page to find the most up-to-date version).
  • You are using a registry named with credentials
    • Username: my-user
    • Password: my-password
  • Your registry uses a self-signed CA certificate and you have access to the cert in a file /tmp/ca.crt
    • The nodes on your cluster must also be configured to trust this CA certificate so they can pull in images. Configuration for this depends on the cluster provider
  • You are using an “online” environment that has access to the internet

Deprecated Features

The legacy Cloud Native Buildpack Bill of Materials (CNB BOM) format is deprecated and is now deactivated by default in Tanzu Build Service. If required, you can activate it manually by passing --data-value-yaml include_legacy_bom=true to ytt when processing the Tanzu Build Service bundle or by adding include_legacy_bom=true to your tbs-values.yml file. The feature will be removed in Tanzu Build Service v1.13.


Relocate Images to a Registry

This procedure relocates images from the Tanzu Network registry to your registry.

  1. Log in to your image registry:

    • If using the docker CLI, run:

      docker login --tlscacert /tmp/ca.crt
    • If using the crane CLI, run:

      crane auth login --tlscacert /tmp/ca.crt
  2. Log in to the Tanzu Network registry with your Tanzu Network credentials:

    • If using the docker CLI, run:

      docker login
    • If using the crane CLI, run:

      crane auth login
  3. Relocate the images with the Carvel tool imgpkg by running:

    imgpkg copy -b "" --to-repo --registry-ca-cert-path /tmp/ca.crt
  4. Pull the Tanzu Build Service bundle locally using imgpkg:

    imgpkg pull -b "" -o /tmp/bundle

Install Tanzu Build Service

Use the Carvel tools kapp, ytt, and kbld to install Build Service and define the required Build Service parameters by running:

ytt -f /tmp/bundle/config/ \
  -f /tmp/ca.crt \
  -v kp_default_repository='' \
  -v kp_default_repository_username='my-user' \
  -v kp_default_repository_password='my-password' \
  --data-value-yaml pull_from_kp_default_repo=true \
  -v tanzunet_username='tanzunet-username' \
  -v tanzunet_password='tanzunet-password' \
  -v descriptor_name='lite' \
  --data-value-yaml enable_automatic_dependency_updates=true \
  | kbld -f /tmp/bundle/.imgpkg/images.yml -f- \
  | kapp deploy -a tanzu-build-service -f- -y

Verify Installation

To verify your Build Service installation:

List the cluster builders available in your installation:

kp clusterbuilder list

You should see an output that looks as follows:

NAME          READY    STACK                          IMAGE
base          true     io.buildpacks.stacks.bionic    <image@sha256:digest>
base-jammy    true     io.buildpacks.stacks.jammy     <image@sha256:digest>
default       true     io.buildpacks.stacks.jammy     <image@sha256:digest>

Create an Image

You can now create a Tanzu Build Service Image to start building you app and keep it patched with the latest Stack and Buildpack Dependencies.

We assume you are using the default namespace, use -n when using kp to set a specific namespace.

  1. Create a Kubernetes Secret that allows your Builds to push to the desired registry with the kp cli:

    kp secret create my-registry-creds --registry --registry-user my-user

    You are prompted for your password (my-password).

  2. Create the Tanzu Build Service Image:

    We use a sample java-maven app:

    kp image create my-image --tag --git --sub-path ./apps/java-maven --wait
check-circle-line exclamation-circle-line close-line
Scroll to top icon