Install the Carvel tools manually (or using Homebrew/Chocolatey):
You will need to download the Carvel CLI tools and rename them as well as add them to your PATH if you're doing it manually:
kapp.exe: https://github.com/vmware-tanzu/carvel-kapp/releases/download/v0.43.0/kapp-windows-amd64.exe ytt.exe: https://github.com/vmware-tanzu/carvel-ytt/releases/download/v0.38.0/ytt-windows-amd64.exe vendir.exe: https://github.com/vmware-tanzu/carvel-vendir/releases/download/v0.24.0/vendir-windows-amd64.exe
kapp version
ytt version
vendir version
Execute ./download-dependencies.sh
to pull down the binaries and files you need. It will add them to your path. If you don't have kubectl installed, you will need to do that too. It's skipped here under the assumption you already have it installed. Also highly recommend creating a developer api key on github and adding it to the file or you'll likely be rate limited.
Check kp
and yq
versions. They're installed as part of the dependencies.
kp version
yq --version
Update the REDACTED pieces in config.yaml (the uid/pass for your harbor repo).
Install kpack by executing install-kpack.sh
This will install two pods into your cluster (make sure your ./kube/config is pointing to the right cluster and your authenticated if needed before running). It will also configure the clusterstack (OS), clusterstore (buildpacks), and a namespaced builder in the default namespace. You can use the same approach to do a clusterbuilder if you want it to be cluster scoped.
Check builder, clusterstack, and clusterstore all are in a good state.
kp builder list
kp clusterstore list
kp clusterstack list
Create image for build
apiVersion: kpack.io/v1alpha2
kind: Image
metadata:
name: weatherforecast-service-api
namespace: default
spec:
tag: harbor.wesleyreisz.com/kpack/weatherforecast-service-api-1
#additionalTags:
#- harbor.wesleyreisz.com/rrsc/spring-petclinic:nightly
serviceAccountName: kpack-service-account
builder:
name: builder
kind: Builder
source:
git:
url: https://bitbucket.org/wesreisz/weatherforecast-kpack.git
revision: main
subPath: src/weatherforecast-service/
Apply the yaml
kubectl apply -f image-weatherforecast-service-api.yaml
Watch the images and logs
kp image list
kp build logs weatherforecast-service-api
You should see a successful run of the build and then you should see the image uploaded into your registry.