knative

by joaquinito2051

Helm chartv1.10.8App v1.10.2

Kubernetes-based platform to build, deploy, and manage modern serverless workloads

About this chart

Knative

Knative is a Kubernetes-based platform to build, deploy, and manage modern serverless workloads.

Introduction

This chart bootstraps Knative's serving and eventing components with the GitHub eventing source in the knative-serving, knative-eventing and knative-sources namespaces.

Prerequisites

  • Kubernetes 1.24+ with Beta APIs enabled

A Quick Note on Versioning

The version references only the revision of the chart itself. The appVersion field in Chart.yaml conveys information regarding the revision of Knative that the chart provides.

Installing the Chart

You must install Istio before installing the chart. Please follow the Installing Istio for Knative guide to install Istio on your Kubernetes cluster.

To install the chart with the release name knative-release:

$ helm install staging/knative --name knative-release

Uninstalling the Chart

You must remove all Knative services and eventing sources before uninstalling the chart. Use the commands below to uninstall the knative-release deployment and clean up all CRDs:

$ helm delete knative-release
$ kubectl get crds --output jsonpath='{.items..metadata.name}' \
  --selector knative.dev/crd-install=true | xargs kubectl delete crd

Configuration

The following table lists the configurable parameters of the Knative chart and their default values.

ParameterDescriptionDefault
global.serviceLabelsAdditional labels for all service definitions in every Knative component, specified as a map.{}
serving.domainDomain for the serving component.example.com
serving.autoscaler.containerConcurrencyTargetPercentageSpecifies value in ConfigMap config-autoscaler, container-concurrency-target-percentage70
serving.autoscaler.containerConcurrencyTargetDefaultSpecifies value in ConfigMap config-autoscaler, container-concurrency-target-default100
serving.autoscaler.requestsPerSecondTargetDefaultSpecifies value in ConfigMap config-autoscaler, requests-per-second-target-default200
serving.autoscaler.targetBurstCapacitySpecifies value in ConfigMap config-autoscaler, target-burst-capacity200
serving.autoscaler.stableWindowSpecifies value in ConfigMap config-autoscaler, stable-window60s
serving.autoscaler.panicWindowPercentageSpecifies value in ConfigMap config-autoscaler, panic-window-percentage10.0
serving.autoscaler.panicThresholdPercentageSpecifies value in ConfigMap config-autoscaler, panic-threshold-percentage200.0
serving.autoscaler.maxScaleUpRateSpecifies value in ConfigMap config-autoscaler, max-scale-up-rate1000.0
serving.autoscaler.maxScaleDownRateSpecifies value in ConfigMap config-autoscaler, max-scale-down-rate2.0
serving.autoscaler.enableScaleToZeroSpecifies value in ConfigMap config-autoscaler, enable-scale-to-zerotrue
serving.autoscaler.scaleToZeroGracePeriodSpecifies value in ConfigMap config-autoscaler, scale-to-zero-grace-period30s
serving.autoscaler.scaleToZeroPodRetentionPeriodSpecifies value in ConfigMap config-autoscaler, scale-to-zero-pod-retention-period0s
serving.autoscaler.podAutoscalerClassSpecifies value in ConfigMap config-autoscaler, pod-autoscaler-classkpa.autoscaling.knative.dev
serving.autoscaler.activatorCapacitySpecifies value in ConfigMap config-autoscaler, activator-capacity100.0
serving.autoscaler.initialScaleSpecifies value in ConfigMap config-autoscaler, initial-scale1
serving.autoscaler.allowZeroInitialScaleSpecifies value in ConfigMap config-autoscaler, allow-zero-initial-scalefalse
serving.autoscaler.maxScaleSpecifies value in ConfigMap config-autoscaler, max-scale0

Specify each parameter using the --set key=value[,key=value] argument to helm install. For example:

$ helm install --name knative-release \
  --set serving.domain=1.2.3.4.nip.io staging/knative

The above command installs the serving component on the domain 1.2.3.4.nip.io, so a Knative application service my-app in the default namespace is accessible through my-app.default.1.2.3.4.nip.io.

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example:

$ helm install --name knative-release --values values.yaml staging/knative

Deploy knative with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has knative on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartknative is pinned at v1.10.8 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply