Cloud Native Runtime を試してみる
Cloud Native Runtime Beta がリリースされたので、インストールして少し試しみました。その際実施した手順のメモです。
環境
- vSphere with Tanzu 7U2
- Tanzu Kubernetes Cluster(TKC)
- Control Plane x 1 台(2vCPU/8GB MEM)
- Worker Node x 1 台(2vCPU/8GB MEM)
手順
TKC のデプロイ
以下のTKC のマニフェストを作成し、Cloud Native Runtime をインストールするTKC をデプロイしています。
$ cat tkc-cnr.yaml
apiVersion: run.tanzu.vmware.com/v1alpha1
kind: TanzuKubernetesCluster
metadata:
name: cnr
namespace: tadashi
spec:
distribution:
version: v1.19.7
topology:
controlPlane:
count: 1
class: best-effort-medium
storageClass: default
volumes:
- name: etcd
mountPath: /var/lib/etcd
capacity:
storage: 16Gi
workers:
count: 1
class: best-effort-medium
storageClass: default
volumes:
- name: containerd
mountPath: /var/lib/containerd
capacity:
storage: 32Gi
settings:
network:
cni:
name: antrea
storage:
defaultClass: default # default storage class setting
$ kubectl apply -f tkc-cnr.yaml
tanzukubernetescluster.run.tanzu.vmware.com/cnr created
Cloud Native Runtime のインストール
VMware Tanzu Network のこちらから必要なパッケージがダウンロード出来ます。事前に作成しておいたディレクトリ内に展開していきます。
$ tar xvzf serverless.tgz -C serverless
serverless/
serverless/.imgpkg/
serverless/.imgpkg/images.yml
serverless/README.md
serverless/VERSION.txt
serverless/bin/
serverless/bin/install-serverless.sh
serverless/config/
serverless/config/eventing/
serverless/config/eventing/core/
serverless/config/eventing/core/100-namespace.yaml
serverless/config/eventing/core/200-eventing-serviceaccount.yaml
serverless/config/eventing/core/200-pingsource-mt-adapter-serviceaccount.yaml
serverless/config/eventing/core/200-webhook-serviceaccount.yaml
serverless/config/eventing/core/configmaps/
serverless/config/eventing/core/configmaps/default-broker-channel.yaml
serverless/config/eventing/core/configmaps/default-broker.yaml
serverless/config/eventing/core/configmaps/default-channel.yaml
serverless/config/eventing/core/configmaps/leader-election.yaml
serverless/config/eventing/core/configmaps/logging.yaml
serverless/config/eventing/core/configmaps/observability.yaml
serverless/config/eventing/core/configmaps/tracing.yaml
serverless/config/eventing/core/deployments/
serverless/config/eventing/core/deployments/controller.yaml
serverless/config/eventing/core/deployments/pingsource-mt-adapter.yaml
serverless/config/eventing/core/deployments/webhook.yaml
serverless/config/eventing/core/resources/
serverless/config/eventing/core/resources/apiserversource.yaml
serverless/config/eventing/core/resources/broker.yaml
serverless/config/eventing/core/resources/channel.yaml
serverless/config/eventing/core/resources/containersource.yaml
serverless/config/eventing/core/resources/eventtype.yaml
serverless/config/eventing/core/resources/parallel.yaml
serverless/config/eventing/core/resources/pingsource.yaml
serverless/config/eventing/core/resources/sequence.yaml
serverless/config/eventing/core/resources/sinkbindings.yaml
serverless/config/eventing/core/resources/subscription.yaml
serverless/config/eventing/core/resources/trigger.yaml
serverless/config/eventing/core/roles/
serverless/config/eventing/core/roles/addressable-resolvers-clusterrole.yaml
serverless/config/eventing/core/roles/broker-clusterrole.yaml
serverless/config/eventing/core/roles/channelable-manipulator-clusterrole.yaml
serverless/config/eventing/core/roles/clusterrole-namespaced.yaml
serverless/config/eventing/core/roles/controller-clusterroles.yaml
serverless/config/eventing/core/roles/pingsource-mt-adapter-clusterrole.yaml
serverless/config/eventing/core/roles/podspecable-binding-clusterrole.yaml
serverless/config/eventing/core/roles/source-observer-clusterrole.yaml
serverless/config/eventing/core/roles/sources-controller-clusterroles.yaml
serverless/config/eventing/core/roles/webhook-clusterrole.yaml
serverless/config/eventing/core/roles/webhook-role.yaml
serverless/config/eventing/core/webhooks/
serverless/config/eventing/core/webhooks/config-validation.yaml
serverless/config/eventing/core/webhooks/defaulting.yaml
serverless/config/eventing/core/webhooks/resource-validation.yaml
serverless/config/eventing/core/webhooks/secret.yaml
serverless/config/eventing/core/webhooks/sinkbindings.yaml
serverless/config/eventing/in-memory-channel/
serverless/config/eventing/in-memory-channel/100-config-event-dispatcher.yaml
serverless/config/eventing/in-memory-channel/200-addressable-resolver-clusterrole.yaml
serverless/config/eventing/in-memory-channel/200-channelable-manipulator-clusterrole.yaml
serverless/config/eventing/in-memory-channel/200-controller-clusterrole.yaml
serverless/config/eventing/in-memory-channel/200-controller-serviceaccount.yaml
serverless/config/eventing/in-memory-channel/200-dispatcher-clusterrole.yaml
serverless/config/eventing/in-memory-channel/200-dispatcher-service.yaml
serverless/config/eventing/in-memory-channel/200-dispatcher-serviceaccount.yaml
serverless/config/eventing/in-memory-channel/201-controller-clusterrolebinding.yaml
serverless/config/eventing/in-memory-channel/201-dispatcher-clusterrolebinding.yaml
serverless/config/eventing/in-memory-channel/300-in-memory-channel.yaml
serverless/config/eventing/in-memory-channel/500-controller.yaml
serverless/config/eventing/in-memory-channel/500-dispatcher.yaml
serverless/config/eventing/in-memory-channel/configmaps/
serverless/config/eventing/in-memory-channel/configmaps/event-dispatcher.yaml
serverless/config/eventing/in-memory-channel/deployments/
serverless/config/eventing/in-memory-channel/deployments/controller.yaml
serverless/config/eventing/in-memory-channel/deployments/dispatcher-service.yaml
serverless/config/eventing/in-memory-channel/deployments/dispatcher.yaml
serverless/config/eventing/in-memory-channel/resources/
serverless/config/eventing/in-memory-channel/resources/in-memory-channel.yaml
serverless/config/eventing/in-memory-channel/roles/
serverless/config/eventing/in-memory-channel/roles/addressable-resolver-clusterrole.yaml
serverless/config/eventing/in-memory-channel/roles/channelable-manipulator-clusterrole.yaml
serverless/config/eventing/in-memory-channel/roles/controller-clusterrole.yaml
serverless/config/eventing/in-memory-channel/roles/dispatcher-clusterrole.yaml
serverless/config/eventing/mt-channel-broker/
serverless/config/eventing/mt-channel-broker/200-channel-clusterrole.yaml
serverless/config/eventing/mt-channel-broker/200-filter-clusterrole.yaml
serverless/config/eventing/mt-channel-broker/200-filter-serviceaccount.yaml
serverless/config/eventing/mt-channel-broker/200-ingress-clusterrole.yaml
serverless/config/eventing/mt-channel-broker/200-ingress-serviceaccount.yaml
serverless/config/eventing/mt-channel-broker/201-channel-clusterrolebinding.yaml
serverless/config/eventing/mt-channel-broker/201-filter-clusterrolebinding.yaml
serverless/config/eventing/mt-channel-broker/201-ingress-clusterrolebinding.yaml
serverless/config/eventing/mt-channel-broker/500-broker-filter.yaml
serverless/config/eventing/mt-channel-broker/500-broker-ingress.yaml
serverless/config/eventing/mt-channel-broker/500-mt-broker-controller.yaml
serverless/config/eventing/mt-channel-broker/deployments/
serverless/config/eventing/mt-channel-broker/deployments/broker-filter.yaml
serverless/config/eventing/mt-channel-broker/deployments/broker-ingress.yaml
serverless/config/eventing/mt-channel-broker/deployments/controller.yaml
serverless/config/eventing/mt-channel-broker/deployments/hpa.yaml
serverless/config/eventing/mt-channel-broker/hpa.yaml
serverless/config/eventing/mt-channel-broker/roles/
serverless/config/eventing/mt-channel-broker/roles/controller-clusterrole.yaml
serverless/config/eventing/mt-channel-broker/roles/controller-clusterrolebinding.yaml
serverless/config/eventing/mt-channel-broker/roles/filter-clusterrole.yaml
serverless/config/eventing/mt-channel-broker/roles/filter-clusterrolebinding.yaml
serverless/config/eventing/mt-channel-broker/roles/filter-serviceaccount.yaml
serverless/config/eventing/mt-channel-broker/roles/ingress-clusterrole.yaml
serverless/config/eventing/mt-channel-broker/roles/ingress-clusterrolebinding.yaml
serverless/config/eventing/mt-channel-broker/roles/ingress-serviceaccount.yaml
serverless/config/eventing/rabbitmq-broker/
serverless/config/eventing/rabbitmq-broker/200-rabbitmq-broker-binding.yaml
serverless/config/eventing/rabbitmq-broker/200-rabbitmq-broker-clusterrole.yaml
serverless/config/eventing/rabbitmq-broker/500-broker-controller.yaml
serverless/config/eventing/vsphere-source/
serverless/config/eventing/vsphere-source/100-namespace.yaml
serverless/config/eventing/vsphere-source/200-clusterrole-cm.yaml
serverless/config/eventing/vsphere-source/200-clusterrole.yaml
serverless/config/eventing/vsphere-source/200-podspecable-binding-clusterrole.yaml
serverless/config/eventing/vsphere-source/200-serviceaccount.yaml
serverless/config/eventing/vsphere-source/201-clusterrolebinding.yaml
serverless/config/eventing/vsphere-source/300-vspherebinding.yaml
serverless/config/eventing/vsphere-source/300-vspheresource.yaml
serverless/config/eventing/vsphere-source/400-webhook-service.yaml
serverless/config/eventing/vsphere-source/500-webhook-configuration.yaml
serverless/config/eventing/vsphere-source/config-leader-election.yaml
serverless/config/eventing/vsphere-source/config-logging.yaml
serverless/config/eventing/vsphere-source/config-observability.yaml
serverless/config/eventing/vsphere-source/webhook.yaml
serverless/config/kbld.yaml
serverless/config/net-contour/
serverless/config/net-contour/200-clusterrole.yaml
serverless/config/net-contour/config-contour.yaml
serverless/config/net-contour/contour/
serverless/config/net-contour/contour/external.yaml
serverless/config/net-contour/contour/internal.yaml
serverless/config/net-contour/controller.yaml
serverless/config/serving/
serverless/config/serving/core/
serverless/config/serving/core/100-namespace.yaml
serverless/config/serving/core/200-roles/
serverless/config/serving/core/200-roles/addressable-resolvers-clusterrole.yaml
serverless/config/serving/core/200-roles/clusterrole-namespaced.yaml
serverless/config/serving/core/200-roles/clusterrole.yaml
serverless/config/serving/core/200-roles/podspecable-bindings-clusterrole.yaml
serverless/config/serving/core/200-serviceaccount.yaml
serverless/config/serving/core/300-imagecache.yaml
serverless/config/serving/core/300-resources/
serverless/config/serving/core/300-resources/certificate.yaml
serverless/config/serving/core/300-resources/configuration.yaml
serverless/config/serving/core/300-resources/ingress.yaml
serverless/config/serving/core/300-resources/metric.yaml
serverless/config/serving/core/300-resources/podautoscaler.yaml
serverless/config/serving/core/300-resources/revision.yaml
serverless/config/serving/core/300-resources/route.yaml
serverless/config/serving/core/300-resources/serverlessservice.yaml
serverless/config/serving/core/300-resources/service.yaml
serverless/config/serving/core/999-cache.yaml
serverless/config/serving/core/configmaps/
serverless/config/serving/core/configmaps/autoscaler.yaml
serverless/config/serving/core/configmaps/defaults.yaml
serverless/config/serving/core/configmaps/deployment.yaml
serverless/config/serving/core/configmaps/domain.yaml
serverless/config/serving/core/configmaps/features.yaml
serverless/config/serving/core/configmaps/gc.yaml
serverless/config/serving/core/configmaps/leader-election.yaml
serverless/config/serving/core/configmaps/logging.yaml
serverless/config/serving/core/configmaps/network.yaml
serverless/config/serving/core/configmaps/observability.yaml
serverless/config/serving/core/configmaps/tracing.yaml
serverless/config/serving/core/deployments/
serverless/config/serving/core/deployments/activator-hpa.yaml
serverless/config/serving/core/deployments/activator.yaml
serverless/config/serving/core/deployments/autoscaler.yaml
serverless/config/serving/core/deployments/controller.yaml
serverless/config/serving/core/deployments/webhook-hpa.yaml
serverless/config/serving/core/deployments/webhook.yaml
serverless/config/serving/core/webhooks/
serverless/config/serving/core/webhooks/configmap-validation.yaml
serverless/config/serving/core/webhooks/defaulting.yaml
serverless/config/serving/core/webhooks/resource-validation.yaml
serverless/config/serving/core/webhooks/secret.yaml
serverless/config/ytt/
serverless/config/ytt/local.yaml
serverless/config/ytt/overlay-contour-envoy-service.yaml
serverless/config/ytt/overlay-envoy-user.yaml
serverless/config/ytt/overlay-knative-config-network.yaml
serverless/config/ytt/overlay-prometheus-annotations.yaml
serverless/config/ytt/registry-secret.yaml
serverless/config/ytt/role-bindings-tkgs.yaml
serverless/config/ytt/role-bindings-tmc.yaml
serverless/config/ytt/values.star
serverless/config/ytt/values.yaml
serverless/config/ytt/vmware-sources-clusterrole-binding.yaml
serverless/docs/
serverless/docs/EVENTING.md
serverless/docs/Eventing-InMemory.md
serverless/docs/Eventing-Rabbit.md
serverless/docs/INSTALLER_IMAGE.md
serverless/docs/OBSERVABILITY.md
serverless/docs/cloud/
serverless/docs/cloud/README.md
手順に従ってインストールしていきます。
vSphere with Tanzu の環境ですので、「Install Cloud Native Runtimes for Tanzu on vSphere」を参考に実施します。
registry.pivotal.io
へのアクセスが必要になると思うので、Tanzu Network のアカウントを用いて事前に以下の環境変数を設定しておきます。$ export serverless_docker_server=registry.pivotal.io
$ export serverless_docker_username=******
$ export serverless_docker_password=******
Cloud Native Runtime をインストールします。
$ serverless_provider=tkgs ./bin/install-serverless.sh
namespace/serverless created
Target cluster 'https://xxx.xxx.xxx.xxx:6443' (nodes: cnr-control-plane-dwtkz, 1+)
resolve | final: docker.io/envoyproxy/envoy:v1.16.0 -> projects.registry.vmware.com/tanzu_serverless/serverless@sha256:96639cb9c3ee3a73eb0f4fe5025c0162f24f3e221514bb0de401a8a45b4e17cd
resolve | final: ko://github.com/projectcontour/contour/cmd/contour -> projects.registry.vmware.com/tanzu_serverless/serverless@sha256:86d712e70166f4a402d1feb582eb51f66915afff4bfb441abce0fcb9f45d6108
resolve | final: ko://github.com/vmware-tanzu/sources-for-knative/cmd/sources-for-knative-adapter -> projects.registry.vmware.com/tanzu_serverless/serverless@sha256:703d015450fc56a081ec17da65c45f63e30e052dc70c24cfb15bc2e87f2fed26
resolve | final: ko://github.com/vmware-tanzu/sources-for-knative/cmd/sources-for-knative-controller -> projects.registry.vmware.com/tanzu_serverless/serverless@sha256:444335e1701890e9ee87ca21375b445731952df4a3239e426070210c043bb49c
resolve | final: ko://knative.dev/eventing-rabbitmq/cmd/controller/broker -> projects.registry.vmware.com/tanzu_serverless/serverless@sha256:1ddbd5dec5db856df52b3893ecd02634b2594b1ab8836ea2507b7f179b2f4e94
resolve | final: ko://knative.dev/eventing-rabbitmq/cmd/dispatcher -> projects.registry.vmware.com/tanzu_serverless/serverless@sha256:44441fbf66f26648c94c6d2353c9cd32313236277cb45d913e99602f4bbfb900
resolve | final: ko://knative.dev/eventing-rabbitmq/cmd/ingress -> projects.registry.vmware.com/tanzu_serverless/serverless@sha256:a35985ea132f0fb3ed1c42719758d00539d50a09dff4b31c96088b22152684a0
resolve | final: ko://knative.dev/eventing/cmd/apiserver_receive_adapter -> projects.registry.vmware.com/tanzu_serverless/serverless@sha256:dc60a2f9365bc91ff82cfa3b0b931925ee36843402288a9c6e59905ac4cf7f95
resolve | final: ko://knative.dev/eventing/cmd/controller -> projects.registry.vmware.com/tanzu_serverless/serverless@sha256:adc93ade317e115b5cb1195d526a16ac90b874e0feb2a9ee6e31ad21a4c9128e
resolve | final: ko://knative.dev/eventing/cmd/in_memory/channel_controller -> projects.registry.vmware.com/tanzu_serverless/serverless@sha256:0f1572cbcb109f2cede3ec49d199b71f396db04e02be458f9520a7925709d533
resolve | final: ko://knative.dev/eventing/cmd/in_memory/channel_dispatcher -> projects.registry.vmware.com/tanzu_serverless/serverless@sha256:b4c5bcf4b74acc18de24da48c26234fb94e7c9135b9c21b4505b3e2ea363632a
resolve | final: ko://knative.dev/eventing/cmd/mtbroker/filter -> projects.registry.vmware.com/tanzu_serverless/serverless@sha256:43377f4297bfe5529126d3b2d0cbadc662c6b5a94197f5479e49c39c8aea2e95
resolve | final: ko://knative.dev/eventing/cmd/mtbroker/ingress -> projects.registry.vmware.com/tanzu_serverless/serverless@sha256:559e69ba3bf9c443ee87d5ff92e37341a19e0f6b57b76adf8c79b92ae069dc91
resolve | final: ko://knative.dev/eventing/cmd/mtchannel_broker -> projects.registry.vmware.com/tanzu_serverless/serverless@sha256:a1adb8c0e64e26dbc247bd439465628f2946705e8c81a28d587346b39a53d9c9
resolve | final: ko://knative.dev/eventing/cmd/mtping -> projects.registry.vmware.com/tanzu_serverless/serverless@sha256:41c7ee86f7e81435373e9077e7b23250cf7625554b82949bd50f37dc63b25b95
resolve | final: ko://knative.dev/eventing/cmd/webhook -> projects.registry.vmware.com/tanzu_serverless/serverless@sha256:8fe6d24974b6751c2eb72c3dfebc1d2ab533c5a6e563aa3f8dafe3fca6a0c0a0
resolve | final: ko://knative.dev/net-contour/cmd/controller -> projects.registry.vmware.com/tanzu_serverless/serverless@sha256:f810a8506b836a0c53e3369f170076ed917b733df2f6b41b03b1c6afe5bc9911
resolve | final: ko://knative.dev/serving/cmd/activator -> projects.registry.vmware.com/tanzu_serverless/serverless@sha256:fba0043e58f4db5cb000bfaf482daa51bec4de5bec58b83711e6d81bb206e8e3
resolve | final: ko://knative.dev/serving/cmd/autoscaler -> projects.registry.vmware.com/tanzu_serverless/serverless@sha256:c1e6d84a28190bd59bdd88563994c153607a305a1a5a933133b584593570a6e8
resolve | final: ko://knative.dev/serving/cmd/controller -> projects.registry.vmware.com/tanzu_serverless/serverless@sha256:cb1f0f2d713f2c0425c40ab1866a06b819df15ef33afd5ed6b22caf1bfdfeba7
resolve | final: ko://knative.dev/serving/cmd/queue -> projects.registry.vmware.com/tanzu_serverless/serverless@sha256:1f134c5553f1102848cfb1e4f1a3c9978ab373ada806a1b9a2f07c71a6779d20
resolve | final: ko://knative.dev/serving/cmd/webhook -> projects.registry.vmware.com/tanzu_serverless/serverless@sha256:d8928b7c515e5161de06cb945f1d1819a49ec46e843a5c787ff2746bd9fa8656
05:41:06PM: debug: Resources: Ignoring group version: schema.GroupVersionResource{Group:"stats.antrea.tanzu.vmware.com", Version:"v1alpha1", Resource:"antreanetworkpolicystats"}
05:41:06PM: debug: Resources: Ignoring group version: schema.GroupVersionResource{Group:"stats.antrea.tanzu.vmware.com", Version:"v1alpha1", Resource:"antreaclusternetworkpolicystats"}
05:41:06PM: debug: Resources: Ignoring group version: schema.GroupVersionResource{Group:"stats.antrea.tanzu.vmware.com", Version:"v1alpha1", Resource:"networkpolicystats"}
Changes
Namespace Name Kind Conds. Age Op Op st. Wait to Rs Ri
(cluster) addressable-resolver ClusterRole - - create - reconcile - -
^ apiserversources.sources.knative.dev CustomResourceDefinition - - create - reconcile - -
^ broker-addressable-resolver ClusterRole - - create - reconcile - -
^ brokers.eventing.knative.dev CustomResourceDefinition - - create - reconcile - -
^ builtin-podspecable-binding ClusterRole - - create - reconcile - -
^ certificates.networking.internal.knative.dev CustomResourceDefinition - - create - reconcile - -
^ channel-addressable-resolver ClusterRole - - create - reconcile - -
^ channelable-manipulator ClusterRole - - create - reconcile - -
^ channels.messaging.knative.dev CustomResourceDefinition - - create - reconcile - -
^ config.webhook.eventing.knative.dev ValidatingWebhookConfiguration - - create - reconcile - -
^ config.webhook.serving.knative.dev ValidatingWebhookConfiguration - - create - reconcile - -
^ config.webhook.sources.tanzu.vmware.com ValidatingWebhookConfiguration - - create - reconcile - -
^ configurations.serving.knative.dev CustomResourceDefinition - - create - reconcile - -
^ containersources.sources.knative.dev CustomResourceDefinition - - create - reconcile - -
^ contour ClusterRole - - create - reconcile - -
^ contour-external ClusterRoleBinding - - create - reconcile - -
^ contour-external Namespace - - create - reconcile - -
^ contour-internal ClusterRoleBinding - - create - reconcile - -
^ contour-internal Namespace - - create - reconcile - -
^ defaulting.webhook.sources.tanzu.vmware.com MutatingWebhookConfiguration - - create - reconcile - -
^ eventing-broker-filter ClusterRole - - create - reconcile - -
^ eventing-broker-ingress ClusterRole - - create - reconcile - -
^ eventing-config-reader ClusterRole - - create - reconcile - -
^ eventing-controller ClusterRoleBinding - - create - reconcile - -
^ eventing-controller-manipulator ClusterRoleBinding - - create - reconcile - -
^ eventing-controller-resolver ClusterRoleBinding - - create - reconcile - -
^ eventing-controller-source-observer ClusterRoleBinding - - create - reconcile - -
^ eventing-controller-sources-controller ClusterRoleBinding - - create - reconcile - -
^ eventing-mt-channel-broker-controller ClusterRoleBinding - - create - reconcile - -
^ eventing-rabbitmq-broker-controller ClusterRoleBinding - - create - reconcile - -
^ eventing-sources-source-observer ClusterRole - - create - reconcile - -
^ eventing-webhook ClusterRoleBinding - - create - reconcile - -
^ eventing-webhook-podspecable-binding ClusterRoleBinding - - create - reconcile - -
^ eventing-webhook-resolver ClusterRoleBinding - - create - reconcile - -
^ eventtypes.eventing.knative.dev CustomResourceDefinition - - create - reconcile - -
^ extensionservices.projectcontour.io CustomResourceDefinition - - create - reconcile - -
^ flows-addressable-resolver ClusterRole - - create - reconcile - -
^ httpproxies.projectcontour.io CustomResourceDefinition - - create - reconcile - -
^ images.caching.internal.knative.dev CustomResourceDefinition - - create - reconcile - -
^ imc-addressable-resolver ClusterRole - - create - reconcile - -
^ imc-channelable-manipulator ClusterRole - - create - reconcile - -
^ imc-controller ClusterRole - - create - reconcile - -
^ imc-controller ClusterRoleBinding - - create - reconcile - -
^ imc-dispatcher ClusterRole - - create - reconcile - -
^ imc-dispatcher ClusterRoleBinding - - create - reconcile - -
^ ingresses.networking.internal.knative.dev CustomResourceDefinition - - create - reconcile - -
^ inmemorychannels.messaging.knative.dev CustomResourceDefinition - - create - reconcile - -
^ knative-bindings-namespaced-admin ClusterRole - - create - reconcile - -
^ knative-contour-core ClusterRole - - create - reconcile - -
^ knative-eventing Namespace - - create - reconcile - -
^ knative-eventing-controller ClusterRole - - create - reconcile - -
^ knative-eventing-mt-broker-filter ClusterRole - - create - reconcile - -
^ knative-eventing-mt-broker-filter ClusterRoleBinding - - create - reconcile - -
^ knative-eventing-mt-broker-ingress ClusterRole - - create - reconcile - -
^ knative-eventing-mt-broker-ingress ClusterRoleBinding - - create - reconcile - -
^ knative-eventing-mt-channel-broker-controller ClusterRole - - create - reconcile - -
^ knative-eventing-namespaced-admin ClusterRole - - create - reconcile - -
^ knative-eventing-namespaced-edit ClusterRole - - create - reconcile - -
^ knative-eventing-namespaced-view ClusterRole - - create - reconcile - -
^ knative-eventing-pingsource-mt-adapter ClusterRole - - create - reconcile - -
^ knative-eventing-pingsource-mt-adapter ClusterRoleBinding - - create - reconcile - -
^ knative-eventing-rabbitmq-broker-controller ClusterRole - - create - reconcile - -
^ knative-eventing-sources-controller ClusterRole - - create - reconcile - -
^ knative-eventing-webhook ClusterRole - - create - reconcile - -
^ knative-flows-namespaced-admin ClusterRole - - create - reconcile - -
^ knative-messaging-namespaced-admin ClusterRole - - create - reconcile - -
^ knative-serving Namespace - - create - reconcile - -
^ knative-serving-addressable-resolver ClusterRole - - create - reconcile - -
^ knative-serving-admin ClusterRole - - create - reconcile - -
^ knative-serving-controller-admin ClusterRoleBinding - - create - reconcile - -
^ knative-serving-core ClusterRole - - create - reconcile - -
^ knative-serving-namespaced-admin ClusterRole - - create - reconcile - -
^ knative-serving-namespaced-edit ClusterRole - - create - reconcile - -
^ knative-serving-namespaced-view ClusterRole - - create - reconcile - -
^ knative-serving-podspecable-binding ClusterRole - - create - reconcile - -
^ knative-sources-namespaced-admin ClusterRole - - create - reconcile - -
^ messaging-addressable-resolver ClusterRole - - create - reconcile - -
^ meta-channelable-manipulator ClusterRole - - create - reconcile - -
^ metrics.autoscaling.internal.knative.dev CustomResourceDefinition - - create - reconcile - -
^ parallels.flows.knative.dev CustomResourceDefinition - - create - reconcile - -
^ pingsources.sources.knative.dev CustomResourceDefinition - - create - reconcile - -
^ podautoscalers.autoscaling.internal.knative.dev CustomResourceDefinition - - create - reconcile - -
^ podspecable-binding ClusterRole - - create - reconcile - -
^ receive-adapter-cm ClusterRole - - create - reconcile - -
^ revisions.serving.knative.dev CustomResourceDefinition - - create - reconcile - -
^ routes.serving.knative.dev CustomResourceDefinition - - create - reconcile - -
^ sequences.flows.knative.dev CustomResourceDefinition - - create - reconcile - -
^ serverlessservices.networking.internal.knative.dev CustomResourceDefinition - - create - reconcile - -
^ service-addressable-resolver ClusterRole - - create - reconcile - -
^ services.serving.knative.dev CustomResourceDefinition - - create - reconcile - -
^ serving-addressable-resolver ClusterRole - - create - reconcile - -
^ sinkbindings.sources.knative.dev CustomResourceDefinition - - create - reconcile - -
^ sinkbindings.webhook.sources.knative.dev MutatingWebhookConfiguration - - create - reconcile - -
^ source-observer ClusterRole - - create - reconcile - -
^ subscriptions.messaging.knative.dev CustomResourceDefinition - - create - reconcile - -
^ tlscertificatedelegations.projectcontour.io CustomResourceDefinition - - create - reconcile - -
^ triggers.eventing.knative.dev CustomResourceDefinition - - create - reconcile - -
^ validation.webhook.eventing.knative.dev ValidatingWebhookConfiguration - - create - reconcile - -
^ validation.webhook.serving.knative.dev ValidatingWebhookConfiguration - - create - reconcile - -
^ validation.webhook.sources.tanzu.vmware.com ValidatingWebhookConfiguration - - create - reconcile - -
^ vmware-sources Namespace - - create - reconcile - -
^ vmware-sources-admin ClusterRole - - create - reconcile - -
^ vmware-sources-controller-admin ClusterRoleBinding - - create - reconcile - -
^ vmware-sources-core ClusterRole - - create - reconcile - -
^ vmware-sources-webhook-addressable-binding ClusterRoleBinding - - create - reconcile - -
^ vmware-sources-webhook-podspecable-binding ClusterRoleBinding - - create - reconcile - -
^ vspherebindings.sources.tanzu.vmware.com CustomResourceDefinition - - create - reconcile - -
^ vspherebindings.webhook.sources.tanzu.vmware.com MutatingWebhookConfiguration - - create - reconcile - -
^ vspheresources.sources.tanzu.vmware.com CustomResourceDefinition - - create - reconcile - -
^ webhook.eventing.knative.dev MutatingWebhookConfiguration - - create - reconcile - -
^ webhook.serving.knative.dev MutatingWebhookConfiguration - - create - reconcile - -
contour-external canonical-registry-secret Secret - - create - reconcile - -
^ contour ConfigMap - - create - reconcile - -
^ contour Deployment - - create - reconcile - -
^ contour RoleBinding - - create - reconcile - -
^ contour Service - - create - reconcile - -
^ contour ServiceAccount - - create - reconcile - -
^ contour-certgen Role - - create - reconcile - -
^ contour-certgen ServiceAccount - - create - reconcile - -
^ contour-certgen-v1.10.0 Job - - create - reconcile - -
^ contour-external-envoy-psp RoleBinding - - create - reconcile - -
^ contour-external-psp RoleBinding - - create - reconcile - -
^ envoy DaemonSet - - create - reconcile - -
^ envoy Service - - create - reconcile - -
^ envoy ServiceAccount - - create - reconcile - -
contour-internal canonical-registry-secret Secret - - create - reconcile - -
^ contour ConfigMap - - create - reconcile - -
^ contour Deployment - - create - reconcile - -
^ contour RoleBinding - - create - reconcile - -
^ contour Service - - create - reconcile - -
^ contour ServiceAccount - - create - reconcile - -
^ contour-certgen Role - - create - reconcile - -
^ contour-certgen ServiceAccount - - create - reconcile - -
^ contour-certgen-v1.10.0 Job - - create - reconcile - -
^ contour-internal-envoy-psp RoleBinding - - create - reconcile - -
^ contour-internal-psp RoleBinding - - create - reconcile - -
^ envoy DaemonSet - - create - reconcile - -
^ envoy Service - - create - reconcile - -
^ envoy ServiceAccount - - create - reconcile - -
knative-eventing broker-filter Service - - create - reconcile - -
^ broker-filter-hpa HorizontalPodAutoscaler - - create - reconcile - -
^ broker-ingress Service - - create - reconcile - -
^ broker-ingress-hpa HorizontalPodAutoscaler - - create - reconcile - -
^ canonical-registry-secret Secret - - create - reconcile - -
^ config-br-default-channel ConfigMap - - create - reconcile - -
^ config-br-defaults ConfigMap - - create - reconcile - -
^ config-imc-event-dispatcher ConfigMap - - create - reconcile - -
^ config-leader-election ConfigMap - - create - reconcile - -
^ config-logging ConfigMap - - create - reconcile - -
^ config-observability ConfigMap - - create - reconcile - -
^ config-tracing ConfigMap - - create - reconcile - -
^ controller-psp-rolebinding RoleBinding - - create - reconcile - -
^ default-ch-webhook ConfigMap - - create - reconcile - -
^ eventing-controller Deployment - - create - reconcile - -
^ eventing-controller ServiceAccount - - create - reconcile - -
^ eventing-webhook Deployment - - create - reconcile - -
^ eventing-webhook RoleBinding - - create - reconcile - -
^ eventing-webhook Service - - create - reconcile - -
^ eventing-webhook ServiceAccount - - create - reconcile - -
^ eventing-webhook-certs Secret - - create - reconcile - -
^ imc-controller Deployment - - create - reconcile - -
^ imc-controller ServiceAccount - - create - reconcile - -
^ imc-dispatcher Deployment - - create - reconcile - -
^ imc-dispatcher Service - - create - reconcile - -
^ imc-dispatcher ServiceAccount - - create - reconcile - -
^ knative-eventing-webhook Role - - create - reconcile - -
^ mt-broker-controller Deployment - - create - reconcile - -
^ mt-broker-filter Deployment - - create - reconcile - -
^ mt-broker-filter ServiceAccount - - create - reconcile - -
^ mt-broker-ingress Deployment - - create - reconcile - -
^ mt-broker-ingress ServiceAccount - - create - reconcile - -
^ pingsource-mt-adapter Deployment - - create - reconcile - -
^ pingsource-mt-adapter ServiceAccount - - create - reconcile - -
^ rabbitmq-broker-controller Deployment - - create - reconcile - -
knative-serving activator Deployment - - create - reconcile - -
^ activator HorizontalPodAutoscaler - - create - reconcile - -
^ activator-pdb PodDisruptionBudget - - create - reconcile - -
^ activator-service Service - - create - reconcile - -
^ autoscaler Deployment - - create - reconcile - -
^ autoscaler Service - - create - reconcile - -
^ canonical-registry-secret Secret - - create - reconcile - -
^ config-autoscaler ConfigMap - - create - reconcile - -
^ config-contour ConfigMap - - create - reconcile - -
^ config-defaults ConfigMap - - create - reconcile - -
^ config-deployment ConfigMap - - create - reconcile - -
^ config-domain ConfigMap - - create - reconcile - -
^ config-features ConfigMap - - create - reconcile - -
^ config-gc ConfigMap - - create - reconcile - -
^ config-leader-election ConfigMap - - create - reconcile - -
^ config-logging ConfigMap - - create - reconcile - -
^ config-network ConfigMap - - create - reconcile - -
^ config-observability ConfigMap - - create - reconcile - -
^ config-tracing ConfigMap - - create - reconcile - -
^ contour-ingress-controller Deployment - - create - reconcile - -
^ controller Deployment - - create - reconcile - -
^ controller Service - - create - reconcile - -
^ controller ServiceAccount - - create - reconcile - -
^ controller-psp-rolebinding RoleBinding - - create - reconcile - -
^ queue-proxy Image - - create - reconcile - -
^ webhook Deployment - - create - reconcile - -
^ webhook HorizontalPodAutoscaler - - create - reconcile - -
^ webhook Service - - create - reconcile - -
^ webhook-certs Secret - - create - reconcile - -
^ webhook-pdb PodDisruptionBudget - - create - reconcile - -
vmware-sources canonical-registry-secret Secret - - create - reconcile - -
^ config-leader-election ConfigMap - - create - reconcile - -
^ config-logging ConfigMap - - create - reconcile - -
^ config-observability ConfigMap - - create - reconcile - -
^ controller ServiceAccount - - create - reconcile - -
^ controller-psp-rolebinding RoleBinding - - create - reconcile - -
^ webhook Deployment - - create - reconcile - -
^ webhook Service - - create - reconcile - -
^ webhook-certs Secret - - create - reconcile - -
Op: 213 create, 0 delete, 0 update, 0 noop
Wait to: 213 reconcile, 0 delete, 0 noop
Continue? [yN]: y
...(SNIP)...
5:47:38PM: ---- applying complete [213/213 done] ----
5:47:38PM: ---- waiting complete [213/213 done] ----
Succeeded
無事にインストール出来ました。
手順に従って幾つか試していきます。
Serving の確認
ドキュメントにある「Verifying Your Serving Installation」を実施してみます。
vSphere with Tanzu 環境なので、手順としては「Verify Your Serving Installation on Vsphere」を実施します。
$ export WORKLOAD_NS=serverless-demo
$ kubectl create ns ${WORKLOAD_NS}
$ kubectl apply -n "${WORKLOAD_NS}" -f - << EOF
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: ${WORKLOAD_NS}-psp
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: psp:vmware-system-privileged
subjects:
- kind: Group
name: system:serviceaccounts:${WORKLOAD_NS}
EOF
$ kubectl -n ${WORKLOAD_NS} create secret docker-registry registry-credentials \
--docker-server "$serverless_docker_server" \
--docker-username "$serverless_docker_username" \
--docker-password "$serverless_docker_password"
$ kubectl patch serviceaccount -n ${WORKLOAD_NS} default \
-p '{"imagePullSecrets": [{"name": "registry-credentials"}]}'
knative を操作していくことになるので、
kn
CLI をインストールします。$ wget https://storage.googleapis.com/knative-nightly/client/latest/kn-linux-amd64
$ mv kn-linux-amd64 kn
$ chmod +x kn
$ sudo mv kn /usr/local/bin/kn
インストールが終わったら、ステップに従って確認していきます。
$ kubectl get ns
NAME STATUS AGE
contour-external Active 8m24s
contour-internal Active 8m20s
default Active 26m
knative-eventing Active 8m20s
knative-serving Active 8m27s
kube-node-lease Active 26m
kube-public Active 26m
kube-system Active 26m
serverless Active 8m39s
serverless-demo Active 76s
vmware-sources Active 8m3s
vmware-system-auth Active 26m
vmware-system-cloud-provider Active 23m
vmware-system-csi Active 23m
$ kn service create helloworld-go -n ${WORKLOAD_NS} \
--image gcr.io/knative-samples/helloworld-go --env TARGET="from Serverless"
Creating service 'helloworld-go' in namespace 'serverless-demo':
0.259s The Route is still working to reflect the latest desired specification.
0.344s ...
0.408s Configuration "helloworld-go" is waiting for a Revision to become ready.
82.631s ...
83.134s Ingress has not yet been reconciled.
83.275s Waiting for Envoys to receive Endpoints data.
84.213s Waiting for load balancer to be ready
84.781s Ready to serve.
Service 'helloworld-go' created to latest revision 'helloworld-go-00001' is available at URL:
http://helloworld-go.serverless-demo.example.com
$ export EXTERNAL_ADDRESS=$(kubectl get service envoy -n contour-external \
--output 'jsonpath={.status.loadBalancer.ingress[0].ip}')
$ curl -H "Host: helloworld-go.${WORKLOAD_NS}.example.com" $EXTERNAL_ADDRESS
Hello from Serverless!
暫くすると、起動している
Deployment
の数はゼロになっている事が分かります。$ kubectl get all -n serverless-demo
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/helloworld-go ExternalName <none> envoy.contour-internal.svc.cluster.local 80/TCP 5d
service/helloworld-go-00001 ClusterIP 10.103.248.211 <none> 80/TCP 5d
service/helloworld-go-00001-private ClusterIP 10.108.159.139 <none> 80/TCP,9090/TCP,9091/TCP,8022/TCP 5d
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/helloworld-go-00001-deployment 0/0 0 0 5d
NAME DESIRED CURRENT READY AGE
replicaset.apps/helloworld-go-00001-deployment-5999bb74bd 0 0 0 5d
NAME CONFIG NAME K8S SERVICE NAME GENERATION READY REASON
revision.serving.knative.dev/helloworld-go-00001 helloworld-go helloworld-go-00001 1 True
NAME URL READY REASON
route.serving.knative.dev/helloworld-go http://helloworld-go.serverless-demo.example.com True
NAME LATESTCREATED LATESTREADY READY REASON
configuration.serving.knative.dev/helloworld-go helloworld-go-00001 helloworld-go-00001 True
NAME URL LATESTCREATED LATESTREADY READY REASON
service.serving.knative.dev/helloworld-go http://helloworld-go.serverless-demo.example.com helloworld-go-00001 helloworld-go-00001 True
また、上と同じ様にリクエストを投げてみると、同じ様にレスポンスが返って来ます。
$ curl -H "Host: helloworld-go.${WORKLOAD_NS}.example.com" $EXTERNAL_ADDRESS
Hello from Serverless!
リソースを確認してみると、
Pod
が立ち上がってゼロスケールが出来ている事が確認出来ます。$ kubectl get all -n serverless-demo
NAME READY STATUS RESTARTS AGE
pod/helloworld-go-00001-deployment-5999bb74bd-z5p5d 2/2 Running 0 12s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/helloworld-go ExternalName <none> envoy.contour-internal.svc.cluster.local 80/TCP 5d
service/helloworld-go-00001 ClusterIP 10.103.248.211 <none> 80/TCP 5d
service/helloworld-go-00001-private ClusterIP 10.108.159.139 <none> 80/TCP,9090/TCP,9091/TCP,8022/TCP 5d
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/helloworld-go-00001-deployment 1/1 1 1 5d
NAME DESIRED CURRENT READY AGE
replicaset.apps/helloworld-go-00001-deployment-5999bb74bd 1 1 1 5d
NAME CONFIG NAME K8S SERVICE NAME GENERATION READY REASON
revision.serving.knative.dev/helloworld-go-00001 helloworld-go helloworld-go-00001 1 True
NAME URL READY REASON
route.serving.knative.dev/helloworld-go http://helloworld-go.serverless-demo.example.com True
NAME LATESTCREATED LATESTREADY READY REASON
configuration.serving.knative.dev/helloworld-go helloworld-go-00001 helloworld-go-00001 True
NAME URL LATESTCREATED LATESTREADY READY REASON
service.serving.knative.dev/helloworld-go http://helloworld-go.serverless-demo.example.com helloworld-go-00001 helloworld-go-00001 True
Eventing の確認
こちら「Verify Your Eventing Installation Using an In-Memory Broker」に沿って実施していきます。RabbitMQ Broker の手順はこちらの環境のリソースで実施するとうまく立ち上がりませんでした。。。
Consumer 用のリソースを作成します。
$ cat <<EOF | kubectl create -f -
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: event-display
namespace: ${WORKLOAD_NS}
spec:
template:
spec:
containers:
- image: gcr.io/knative-releases/knative.dev/eventing-contrib/cmd/event_display
EOF
Broker
, Trigger
, Producer
用のリソースを作成していきます。$ kubectl create -f - <<EOF
apiVersion: eventing.knative.dev/v1
kind: Broker
metadata:
name: default
namespace: ${WORKLOAD_NS}
EOF
$ kubectl apply -f - <<EOF
apiVersion: eventing.knative.dev/v1
kind: Trigger
metadata:
name: event-display
namespace: ${WORKLOAD_NS}
spec:
broker: default
subscriber:
ref:
apiVersion: serving.knative.dev/v1
kind: Service
name: event-display
namespace: ${WORKLOAD_NS}
EOF
$ cat << EOF | kubectl create -f -
apiVersion: sources.knative.dev/v1alpha2
kind: PingSource
metadata:
name: test-ping-source
namespace: ${WORKLOAD_NS}
spec:
schedule: "*/1 * * * *"
jsonData: '{"message": "Hello Eventing!"}'
sink:
ref:
apiVersion: eventing.knative.dev/v1
kind: Broker
name: default
namespace: ${WORKLOAD_NS}
EOF
Namespace
serverless-demo
のリソースを確認します。$ kubectl get all -n serverless-demo
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/default-kne-trigger-kn-channel ExternalName <none> imc-dispatcher.knative-eventing.svc.cluster.local <none> 119s
service/event-display ExternalName <none> envoy.contour-internal.svc.cluster.local 80/TCP 2m54s
service/event-display-00001 ClusterIP 10.111.210.222 <none> 80/TCP 3m11s
service/event-display-00001-private ClusterIP 10.96.182.216 <none> 80/TCP,9090/TCP,9091/TCP,8022/TCP 3m11s
service/helloworld-go ExternalName <none> envoy.contour-internal.svc.cluster.local 80/TCP 5d1h
service/helloworld-go-00001 ClusterIP 10.103.248.211 <none> 80/TCP 5d1h
service/helloworld-go-00001-private ClusterIP 10.108.159.139 <none> 80/TCP,9090/TCP,9091/TCP,8022/TCP 5d1h
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/event-display-00001-deployment 0/0 0 0 3m13s
deployment.apps/helloworld-go-00001-deployment 0/0 0 0 5d1h
NAME DESIRED CURRENT READY AGE
replicaset.apps/event-display-00001-deployment-75876f8d5c 0 0 0 3m14s
replicaset.apps/helloworld-go-00001-deployment-5999bb74bd 0 0 0 5d1h
NAME URL AGE READY REASON
broker.eventing.knative.dev/default http://broker-ingress.knative-eventing.svc.cluster.local/serverless-demo/default 2m True
NAME BROKER SUBSCRIBER_URI AGE READY REASON
trigger.eventing.knative.dev/event-display default http://event-display.serverless-demo.svc.cluster.local 69s True
NAME TYPE SOURCE SCHEMA BROKER DESCRIPTION READY REASON
eventtype.eventing.knative.dev/14654c78cfd80ed8e68a32e9e44e3173 dev.knative.sources.ping /apis/v1/namespaces/serverless-demo/pingsources/test-ping-source default True
NAME URL AGE READY REASON
inmemorychannel.messaging.knative.dev/default-kne-trigger http://default-kne-trigger-kn-channel.serverless-demo.svc.cluster.local 2m1s True
NAME AGE READY REASON
subscription.messaging.knative.dev/default-event-display-33cb35b2-9406-41b0-9629-90bcbe8de231 70s True
NAME CONFIG NAME K8S SERVICE NAME GENERATION READY REASON
revision.serving.knative.dev/event-display-00001 event-display event-display-00001 1 True
revision.serving.knative.dev/helloworld-go-00001 helloworld-go helloworld-go-00001 1 True
NAME URL READY REASON
route.serving.knative.dev/event-display http://event-display.serverless-demo.example.com True
route.serving.knative.dev/helloworld-go http://helloworld-go.serverless-demo.example.com True
NAME LATESTCREATED LATESTREADY READY REASON
configuration.serving.knative.dev/event-display event-display-00001 event-display-00001 True
configuration.serving.knative.dev/helloworld-go helloworld-go-00001 helloworld-go-00001 True
NAME URL LATESTCREATED LATESTREADY READY REASON
service.serving.knative.dev/event-display http://event-display.serverless-demo.example.com event-display-00001 event-display-00001 True
service.serving.knative.dev/helloworld-go http://helloworld-go.serverless-demo.example.com helloworld-go-00001 helloworld-go-00001 True
NAME SINK SCHEDULE AGE READY REASON
pingsource.sources.knative.dev/test-ping-source http://broker-ingress.knative-eventing.svc.cluster.local/serverless-demo/default */1 * * * * 37s True
$ kubectl logs -l serving.knative.dev/service=event-display -c user-container -n ${WORKLOAD_NS} --since=10m --tail=50
☁️ cloudevents.Event
Validation: valid
Context Attributes,
specversion: 1.0
type: dev.knative.sources.ping
source: /apis/v1/namespaces/serverless-demo/pingsources/test-ping-source
id: d5f1e5c2-d440-431f-a5b7-cf874ee2c9c8
time: 2021-04-05T02:19:00.348113922Z
datacontenttype: application/json
Extensions,
knativearrivaltime: 2021-04-05T02:19:00.383418554Z
Data,
{
"message": "Hello Eventing!"
}
まとめ
Cloud Native Runtime のインストールと、ちょっとした確認はうまくいきました。
- リンクを取得
- ×
- メール
- 他のアプリ