This topic tells you how to gain kubeconfig access to the Kubernetes cluster with Tanzu Build Service (commonly known as TBS).

For example, if you are using TKGI (formerly PKS):

tkgi login -a <tkg-api-url> -u <username> -p <password>
tkgi get-credentials <clustername> -a <tkg-api-url> -u <username> -p <password>

You can use the kp CLI, downloaded as part of the installation to interact with Build Service. The kp CLI uses the local KUBECONFIG utilized by kubectl. All operations are performed on Kubernetes current-context namespace.

The kp CLI help text is published here.

$ kp
kp controls the kpack installation on Kubernetes.

kpack extends Kubernetes and utilizes unprivileged kubernetes primitives to provide
builds of OCI images as a platform implementation of Cloud Native Buildpacks (CNB).
Learn more about kpack @ https://github.com/buildpacks-community/kpack

Usage:
  kp [command]

Available Commands:
  build          Build Commands
  builder        Builder Commands
  clusterbuilder Cluster Builder Commands
  clusterstack   Cluster Stack Commands
  clusterstore   Cluster Store Commands
  completion     Generate completion script
  help           Help about any command
  image          Image commands
  import         Import dependencies for stores, stacks, and cluster builders
  secret         Secret Commands
  version        Display kp version

Flags:
  -h, --help   help for kp

Use "kp [command] --help" for more information about a command.

Note: 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.

check-circle-line exclamation-circle-line close-line
Scroll to top icon