This is a script to install kpack on an existing K8's cluster. It's meant to demo the product, so there are some things assumed. Like,
- You already have a healthy K8's cluster, and have loaded its context in your profile's config file.
- The image repository of choice is Docker Hub.
- You have a Docker Hub account
- When installing the needed ClusterBuilder the
cloudfoundry/cnb:bionic
is used. - A generic
docker-service-account
is created for use throughout the cluster. As opposed to a service-account specific to an app.
To learn more about the kpack project, go here. To learn more about the cloud native buildpacks project, go here.
-
List your installed cluster contexts.
$ kubectl config get-contexts
-
Using the name retrieved from above output, set your context for
kubectl
interactions.$ kubectl config use-context <CONTEXT_NAME>
-
Head over to the releases page in the kpack repo to download the latest yaml asset. (The install script will ask for its location)
-
Clone this repo.
$ git clone https://github.com/ddieruf/kpack-demo.git; cd "kpack-demo"
-
Provide credentials for interacting with Docker Hub in the
Install-kpack/kpack-assets.yaml
file. -
Run the install script to get everything going. Pass in the location of the kpack manifest downloaded earlier.
$ ./Install-kpack/install-kpack.sh ./release-XXX.yaml
-
If the script was able to run successfully, it should exit with no error messages and a final "success" message.
-
You are ready to use kpack with an application. Have a look at the preconfigured .NET Core project.
See the namespace created for kpack things:
kubectl describe namespace "kpack"
List the installed ClusterBuilder details, along with what buildpacks were included:
kubectl describe clusterbuilder "cloud-foundry"
List the pods included in the kpack namespace:
kubectl get pods --namespace "kpack"