Installing Cloud Native Runtime for VMware Tanzu on minikube cluster with Dockerhub

Author: Dinesh Tripathi (@dinesh30)

Photo by Snapwire on Pexels.com

Cloud Native Runtimes for Tanzu is a serverless application runtime for Kubernetes that is based on Knative and runs on a single Kubernetes cluster. For information about Knative, see the Knative documentation. Cloud Native Runtimes capabilities are included in VMware Tanzu Advanced Edition and VMware Tanzu Application Platform.

Installation Steps

Install kapp controller

$ kapp deploy -a kc -f https://github.com/vmware-tanzu/carvel-kapp-controller/releases/latest/download/release.yml
Target cluster 'https://192.168.99.109:8443' (nodes: minikube)

Namespace        Name                                                    Kind                      Conds.  Age  Op      Op st.  Wait to    Rs  Ri  
(cluster)        apps.kappctrl.k14s.io                                   CustomResourceDefinition  -       -    create  -       reconcile  -   -  
^                internalpackagemetadatas.internal.packaging.carvel.dev  CustomResourceDefinition  -       -    create  -       reconcile  -   -  
^                internalpackages.internal.packaging.carvel.dev          CustomResourceDefinition  -       -    create  -       reconcile  -   -  
^                kapp-controller                                         Namespace                 -       -    create  -       reconcile  -   -  
^                kapp-controller-cluster-role                            ClusterRole               -       -    create  -       reconcile  -   -  
^                kapp-controller-cluster-role-binding                    ClusterRoleBinding        -       -    create  -       reconcile  -   -  
^                kapp-controller-packaging-global                        Namespace                 -       -    create  -       reconcile  -   -  
^                packageinstalls.packaging.carvel.dev                    CustomResourceDefinition  -       -    create  -       reconcile  -   -  
^                packagerepositories.packaging.carvel.dev                CustomResourceDefinition  -       -    create  -       reconcile  -   -  
^                pkg-apiserver:system:auth-delegator                     ClusterRoleBinding        -       -    create  -       reconcile  -   -  
^                v1alpha1.data.packaging.carvel.dev                      APIService                -       -    create  -       reconcile  -   -  
kapp-controller  kapp-controller                                         Deployment                -       -    create  -       reconcile  -   -  
^                kapp-controller-sa                                      ServiceAccount            -       -    create  -       reconcile  -   -  
^                packaging-api                                           Service                   -       -    create  -       reconcile  -   -  
kube-system      pkgserver-auth-reader                                   RoleBinding               -       -    create  -       reconcile  -   -  

Op:      15 create, 0 delete, 0 update, 0 noop
Wait to: 15 reconcile, 0 delete, 0 noop

Continue? [yN]: y
----------
---------
8:53:31AM: ---- applying complete [15/15 done] ----
8:53:31AM: ---- waiting complete [15/15 done] ----

Succeeded

Download the Cloud Native Runtime binaries from Tanzu Network site

$ pivnet download-product-files --product-slug='serverless' --release-version='1.0.2+build.81' --product-file-id=1027518
2021/09/11 08:58:42 Downloading 'cloud-native-runtimes-1.0.2.tgz' to 'cloud-native-runtimes-1.0.2.tgz'
 9.10 KiB / 9.10 KiB [==============================================] 100.00% 0s
2021/09/11 08:58:46 Verifying SHA256
2021/09/11 08:58:46 Successfully verified SHA256

Warning: Your version of Pivnet CLI (2.0.2) does not match the currently released version (3.0.1).

$ pivnet download-product-files --product-slug='serverless' --release-version='1.0.2+build.81' --product-file-id=1027517
2021/09/11 09:59:33 Downloading 'cloud-native-runtimes-1.0.2.lock' to 'cloud-native-runtimes-1.0.2.lock'
 216 B / 216 B [====================================================] 100.00% 0s
2021/09/11 09:59:35 Verifying SHA256
2021/09/11 09:59:35 Successfully verified SHA256

Warning: Your version of Pivnet CLI (2.0.2) does not match the currently released version (3.0.1).

Extract the tar file

$ tar -xvf cloud-native-runtimes-1.0.2.tgz                       
x cloud-native-runtimes/
x cloud-native-runtimes/.imgpkg/
x cloud-native-runtimes/.imgpkg/images.yml
x cloud-native-runtimes/README.md
x cloud-native-runtimes/VERSION.txt
x cloud-native-runtimes/bin/
x cloud-native-runtimes/bin/install.sh
x cloud-native-runtimes/config/
x cloud-native-runtimes/config/app.yaml
x cloud-native-runtimes/config/cnr-config.yaml
x cloud-native-runtimes/config/kapp.yaml
x cloud-native-runtimes/config/overlays/
x cloud-native-runtimes/config/overlays/100-values.star
x cloud-native-runtimes/config/overlays/100-values.yaml
x cloud-native-runtimes/config/overlays/kapp-controller-bundle-secret.yaml
x cloud-native-runtimes/config/overlays/serverless-values-secret-overlay.yaml
x cloud-native-runtimes/observability/
x cloud-native-runtimes/observability/wavefront/
x cloud-native-runtimes/observability/wavefront/app-operator-revision-view.json
x cloud-native-runtimes/observability/wavefront/app-operator-service-view.json

Image Copy to registry

$ imgpkg copy --lock cloud-native-runtimes-1.0.2.lock --to-repo dineshtripathi30/cnr --lock-output ./relocated.lock   
copy | exporting 44 images...
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:007139a0c1becd8cb70f919a490f583ca27a6e1894266e80b109b7f0666ab46f
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:087fde5000e9753ba18416b61cf5e08252b1efcf25e5763c07d294e1cf780b5f
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:1c2b006f1b90858924fbe59fffddb9af7abf83ea28170d56b7eef54dc0c4e8cd
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:21d4949b1f03e5f505fa94bb23186eb72a3df2ef492cb6934e7681abff5259b9
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:39b83b79237a72df90aaf5a68a9ebed8a0627095b187a32ea16f9aea4e912407
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:5874763805fb8714c117179505d565644397ff589be8f56fd57b316a0b2e464a
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:5e648ca11a93d743007751ac5ae33c664dd69e12eddba18a753bef0039b18e5e
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:620e4ba295ff3159410056e14f751646dbb004224ea72ff60cd382b467a3ef38
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:6448a628fa7655ebfd600e071afe73d585bf40845bb822b17741fe8935a62096
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:67fb8ce04a96761cdb7c0af70d2d83304799b9b93c308d8fdd3399ce74e59a6f
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:736caa1504c01331d2ca55a51813ab3ba1dedb0103d8f4df79bd8bf3d2272517
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:748135423939fe869738213d9eba4908f91e08e8138c59b9506562c4431a07fe
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:7564175a982fa64267e1b3b55507c882189ce34dd9842f0fa157f411c7784571
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:75de41cbefd07213c888708a9384106f79a7c1eac9e2f70341542fc8d0a225ea
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:78b0766a7f0a04f717b2aa85ecadc6b2fc26a79d0d37fff3ff106e7eade10082
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:7b5307e6fa0c0b019284862db880097de31a99ea76462e854f3e9a31ac599e0d
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:7c7ed9d426a6372f8307c3df22d8945dfe9b4f4131b810f7130c04923883e875
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:7e830af7495d2bf041be379a4442f8b18f04746396fcd9cf7e24b77992d3dbd3
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:92c0f26b74395d1f5763605c710386ccd178da837e0425efeaf3680128aca7ef
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:932a48da04135a8f18bdaf97588c84d8a94a2bbd530a90061b9618e53afb3c6a
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:a0c17e32a0a9f3749a545bddb052ff529eb46801e973b83df7aa7c5b22f77532
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:a1917c6fec721edfb44290f0d316480782670e3531b9e47ef98e4376c57bb27c
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:a8889be5a497e75f4aa2c70623fc89b7c8a14d23d12cc67f878b64dd568c84ef
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:abd56434c05c63e2248ebad5bbf4026bb260577cbf9b8f5b77df32ffeb95f497
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:b1d6f0ba50960f8a5476e5e9b93ff9f427f567d233266488c784981050865015
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:b33bba453e03b465c5e1f7b57dc5ed7ad79291846d1bd066bae6a05f6107602a
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:b7305d94693c7ae9977fff1072dc61f91ce48417a85394273582505d20e4da7e
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:bcd7c08db93c2c4830d7ab9f9cbb51a8108988583c9ef132dd0b78da0439518a
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:c41d5b1ad197d97309266a5ae77b9e663cbfa3fc973028c2a096e60d193c9a7d
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:c9529d4e6abb11da6bf74ddd8591880c31391ffe816520af2afe7e0c59c89cca
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:d15bb954c71e391b4856d1f2e2161cf46c1dc122740ca4f6ea802143359161f5
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:d522bf953456f8dec03550dd165361b3bf2c182d327c388d36d1a6ee0186c10b
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:d951d50b2212ad0923c63547008a73a95d3f8ed533335e7718fa4ebfbb829a20
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:dc7bcfa9ad1980d83ce4b31f496d5272e842dfaf16d90b0dbff77a3131f8e053
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:df9d7a4927aece444866d6798dbd4545917291410f55e55d83cf81fd255e1ed0
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:dff17bd9c5af163f06425ed2abaf59ab929876496627cdd992c7605de2a95e05
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:e2035a467654d13243ace7cfac05a92617c9b382ea3a223341da15458bbc7b33
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:e2c6305792854196683b452732cb38e54b20a51819da76654873952a3a014889
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:e868cb08c35c7315d052729714cf513493df981d6479d1b3a939e25b439fd11a
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:e8bff8af15053478968207a8f3ea401a71222a1a296726000a0ae0cc2349cde1
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:e8ea413061259bdfb192cbfd5919d98d84875f60c5467db0f6f82b7719c9f853
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:ec50d1e42178494f9395b0ca66a2ec048707cdae81a5a87ad95ef47b35e50501
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:ef378293c79cf0cbb6c7f7c178c0abff15fcee573f8b5b3e7a891ba8d77927d8
copy | will export projects.registry.vmware.com/tanzu_serverless/release@sha256:fb8d6142ed40b3e86f498f1d073d9f81b538316f5de4332f5feab9b6ec7bdb6c
copy | exported 44 images
copy | importing 44 images...

 990.54 MiB / 990.85 MiB [===================================================================================================]  99.97% 4.19 MiB/s 3m56s

copy | done uploading images
Succeeded

Run the imgpkg pull

 $  imgpkg pull --lock ./relocated.lock -o ./cloud-native-runtimes  
Pulling bundle 'index.docker.io/dineshtripathi30/cnr@sha256:7c7ed9d426a6372f8307c3df22d8945dfe9b4f4131b810f7130c04923883e875'
  Extracting layer 'sha256:96a87db29d1ddcb744fbd5047f585bdfc6acd3829efb2a13528891102d4ddbd4' (1/1)

Locating image lock file images...
The bundle repo (index.docker.io/dineshtripathi30/cnr) is hosting every image specified in the bundle's Images Lock file (.imgpkg/images.yml)

Succeeded
 $ cd cloud-native-runtimes && ls
README.md     VERSION.txt   bin           config        observability
 $ chmod +x ./bin/install.sh

Install the Cloud Native Runtime

$ cnr_provider=local ./bin/install.sh
~/cnr/cloud-native-runtimes ~/cnr/cloud-native-runtimes
namespace/cloud-native-runtimes created
Target cluster 'https://192.168.99.109:8443' (nodes: minikube)
resolve | final: projects.registry.vmware.com/tanzu_serverless/release@sha256:d951d50b2212ad0923c63547008a73a95d3f8ed533335e7718fa4ebfbb829a20 -> index.docker.io/dineshtripathi30/cnr@sha256:d951d50b2212ad0923c63547008a73a95d3f8ed533335e7718fa4ebfbb829a20

Changes

Namespace              Name                   Kind                Conds.  Age  Op      Op st.  Wait to    Rs  Ri  
(cluster)              cnr-role-binding       ClusterRoleBinding  -       -    create  -       reconcile  -   -  
cloud-native-runtimes  cloud-native-runtimes  App                 -       -    create  -       reconcile  -   -  
^                      cnr-sa                 ServiceAccount      -       -    create  -       reconcile  -   -  
^                      cnr-values             Secret              -       -    create  -       reconcile  -   -  

Op:      4 create, 0 delete, 0 update, 0 noop
Wait to: 4 reconcile, 0 delete, 0 noop

Continue? yN]: y

10:14:59AM: ---- applying 3 changes [0/4 done] ----
10:14:59AM: create clusterrolebinding/cnr-role-binding (rbac.authorization.k8s.io/v1) cluster
10:14:59AM: create secret/cnr-values (v1) namespace: cloud-native-runtimes
10:14:59AM: create serviceaccount/cnr-sa (v1) namespace: cloud-native-runtimes
10:14:59AM: ---- waiting on 3 changes [0/4 done] ----
10:14:59AM: ok: reconcile secret/cnr-values (v1) namespace: cloud-native-runtimes
10:14:59AM: ok: reconcile serviceaccount/cnr-sa (v1) namespace: cloud-native-runtimes
10:14:59AM: ok: reconcile clusterrolebinding/cnr-role-binding (rbac.authorization.k8s.io/v1) cluster
10:14:59AM: ---- applying 1 changes [3/4 done] ----
10:14:59AM: create app/cloud-native-runtimes (kappctrl.k14s.io/v1alpha1) namespace: cloud-native-runtimes
10:14:59AM: ---- waiting on 1 changes [3/4 done] ----
10:14:59AM: ongoing: reconcile app/cloud-native-runtimes (kappctrl.k14s.io/v1alpha1) namespace: cloud-native-runtimes
10:14:59AM:  ^ Waiting for generation 1 to be observed
10:15:00AM: ongoing: reconcile app/cloud-native-runtimes (kappctrl.k14s.io/v1alpha1) namespace: cloud-native-runtimes
10:15:00AM:  ^ Reconciling
10:15:59AM: ---- waiting on 1 changes [3/4 done] ----
10:16:00AM: ongoing: reconcile app/cloud-native-runtimes (kappctrl.k14s.io/v1alpha1) namespace: cloud-native-runtimes
10:16:00AM:  ^ Reconciling</span>
-----------
----------
----------
Succeeded

Validation

See the number of namespaces created and pods inside them.

$ k get ns              
NAME                               STATUS   AGE
cloud-native-runtimes              Active   17m
contour-external                   Active   17m
contour-internal                   Active   17m
default                            Active   124d
kapp-controller                    Active   100m
kapp-controller-packaging-global   Active   100m
knative-discovery                  Active   17m
knative-eventing                   Active   17m
knative-serving                    Active   17m
knative-sources                    Active   17m
kube-node-lease                    Active   124d
kube-public                        Active   124d
kube-system                        Active   124d
triggermesh                        Active   17m
vmware-sources                     Active   17m

Official document link

https://docs.vmware.com/en/Cloud-Native-Runtimes-for-VMware-Tanzu/1.0/tanzu-cloud-native-runtimes-1-0/GUID-install.html

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s