linkerd2

by joaquinito2051

Helm chartv2.10.2App stable-2.10.2

Linkerd gives you observability, reliability, and security for your microservices — with no code change required.

About this chart

linkerd2

Linkerd gives you observability, reliability, and security for your microservices — with no code change required.

Homepage: https://linkerd.io

Quickstart and documentation

You can run Linkerd on any Kubernetes 1.16+ cluster in a matter of seconds. See the Linkerd Getting Started Guide for how.

For more comprehensive documentation, start with the Linkerd docs.

Prerequisite: identity certificates

The identity component of Linkerd requires setting up a trust anchor certificate, and an issuer certificate with its key. These need to be provided to Helm by the user (unlike when using the linkerd install CLI which can generate these automatically). You can provide your own, or follow these instructions to generate new ones.

Note that the provided certificates must be ECDSA certificates.

Adding Linkerd's Helm repository

# To add the repo for Linkerd2 stable releases:
helm repo add linkerd https://helm.linkerd.io/stable
# To add the repo for Linkerd2 edge releases:
helm repo add linkerd-edge https://helm.linkerd.io/edge

The following instructions use the linkerd repo. For installing an edge release, just replace with linkerd-edge.

Installing the chart

You must provide the certificates and keys described in the preceding section, and the same expiration date you used to generate the Issuer certificate.

In this example we set the expiration date to one year ahead:

helm install \
  --set-file identityTrustAnchorsPEM=ca.crt \
  --set-file identity.issuer.tls.crtPEM=issuer.crt \
  --set-file identity.issuer.tls.keyPEM=issuer.key \
  --set identity.issuer.crtExpiry=$(date -d '+8760 hour' +"%Y-%m-%dT%H:%M:%SZ") \
  linkerd/linkerd2

Setting High-Availability

Besides the default values.yaml file, the chart provides a values-ha.yaml file that overrides some default values as to set things up under a high-availability scenario, analogous to the --ha option in linkerd install. Values such as higher number of replicas, higher memory/cpu limits and affinities are specified in that file.

You can get ahold of values-ha.yaml by fetching the chart files:

helm fetch --untar linkerd/linkerd2

Then use the -f flag to provide the override file, for example:

helm install \
  --set-file identityTrustAnchorsPEM=ca.crt \
  --set-file identity.issuer.tls.crtPEM=issuer.crt \
  --set-file identity.issuer.tls.keyPEM=issuer.key \
  --set identity.issuer.crtExpiry=$(date -d '+8760 hour' +"%Y-%m-%dT%H:%M:%SZ") \
  -f linkerd2/values-ha.yaml
  linkerd/linkerd2

Get involved

Extensions for Linkerd

The current chart installs the core Linkerd components, which grant you reliability and security features. Other functionality is available through extensions. Check the corresponding docs for each one of the following extensions:

Requirements

Kubernetes: >=1.16.0-0

RepositoryNameVersion
file://../partialspartials0.1.0

Values

KeyTypeDefaultDescription
clusterDomainstring"cluster.local"Kubernetes DNS Domain name to use
clusterNetworksstring"10.0.0.0/8,100.64.0.0/10,172.16.0.0/12,192.168.0.0/16"The cluster networks for which service discovery is performed. This should include the pod network but need not include the node network. By default, all private networks are specified so that resolution works in typical Kubernetes environments.
cniEnabledboolfalseenabling this omits the NET_ADMIN capability in the PSP and the proxy-init container when injecting the proxy; requires the linkerd-cni plugin to already be installed
controlPlaneTracingboolfalseenables control plane tracing
controlPlaneTracingNamespacestring"linkerd-jaeger"namespace to send control plane traces to
controllerImagestring"cr.l5d.io/linkerd/controller"Docker image for the controller and identity components
controllerLogFormatstring"plain"Log format for the control plane components
controllerLogLevelstring"info"Log level for the control plane components
controllerReplicasint1Number of replicas for each control plane pod
controllerUIDint2103User ID for the control plane components
debugContainer.image.namestring"cr.l5d.io/linkerd/debug"Docker image for the debug container
debugContainer.image.pullPolicystringimagePullPolicyPull policy for the debug container Docker image
debugContainer.image.versionstringlinkerdVersionTag for the debug container Docker image
disableHeartBeatboolfalseSet to true to not start the heartbeat cronjob
enableEndpointSlicesboolfalseenables the use of EndpointSlice informers for the destination service; enableEndpointSlices should be set to true only if EndpointSlice K8s feature gate is on; the feature is still experimental.
enableH2UpgradebooltrueAllow proxies to perform transparent HTTP/2 upgrading
identity.issuer.clockSkewAllowancestring"20s"Amount of time to allow for clock skew within a Linkerd cluster
identity.issuer.crtExpirystringnilExpiration timestamp for the issuer certificate. It must be provided during install. Must match the expiry date in crtPEM
identity.issuer.issuanceLifetimestring"24h0m0s"Amount of time for which the Identity issuer should certify identity
identity.issuer.schemestring"linkerd.io/tls"
identity.issuer.tlsobject{"crtPEM":"","keyPEM":""}Which scheme is used for the identity issuer secret format
identity.issuer.tls.crtPEMstring""Issuer certificate (ECDSA). It must be provided during install.
identity.issuer.tls.keyPEMstring""Key for the issuer certificate (ECDSA). It must be provided during install
identityTrustAnchorsPEMstring""Trust root certificate (ECDSA). It must be provided during install.
identityTrustDomainstringclusterDomainTrust domain used for identity
imagePullPolicystring"IfNotPresent"Docker image pull policy
imagePullSecretslist[]For Private docker registries, authentication is needed. Registry secrets are applied to the respective service accounts
installNamespacebooltrueSet to false when installing Linkerd in a custom namespace. See the Linkerd documentation for more information.
linkerdVersionstring"linkerdVersionValue"control plane version. See Proxy section for proxy version
namespacestring"linkerd"Control plane namespace
nodeSelectorobject{"beta.kubernetes.io/os":"linux"}NodeSelector section, See the K8S documentation for more information
omitWebhookSideEffectsboolfalseOmit the sideEffects flag in the webhook manifests
podAnnotationsobject{}Additional annotations to add to all pods
podLabelsobject{}Additional labels to add to all pods
profileValidator.caBundlestring""Bundle of CA certificates for service profile validator. If not provided then Helm will use the certificate generated for profileValidator.crtPEM. If profileValidator.externalSecret is set to true, this value must be set, as no certificate will be generated.
profileValidator.crtPEMstring""Certificate for the service profile validator. If not provided then Helm will generate one.
profileValidator.externalSecretboolfalseDo not create a secret resource for the profileValidator webhook. If this is set to true, the value profileValidator.caBundle must be set (see below).
profileValidator.keyPEMstring""Certificate key for the service profile validator. If not provided then Helm will generate one.
profileValidator.namespaceSelectorobject{"matchExpressions":[{"key":"config.linkerd.io/admission-webhooks","operator":"NotIn","values":["disabled"]}]}Namespace selector used by admission webhook
proxy.coresint0The cpu.limit and cores should be kept in sync. The value of cores must be an integer and should typically be set by rounding up from the limit. E.g. if cpu.limit is '1500m', cores should be 2.
proxy.enableExternalProfilesboolfalseEnable service profiles for non-Kubernetes services
proxy.image.namestring"cr.l5d.io/linkerd/proxy"Docker image for the proxy
proxy.image.pullPolicystringimagePullPolicyPull policy for the proxy container Docker image
proxy.image.versionstringlinkerdVersionTag for the proxy container Docker image
proxy.inboundConnectTimeoutstring"100ms"Maximum time allowed for the proxy to establish an inbound TCP connection
proxy.logFormatstring"plain"Log format (plain or json) for the proxy
proxy.logLevelstring"warn,linkerd=info"Log level for the proxy
proxy.opaquePortsstring"25,443,587,3306,5432,11211"Default set of opaque ports - SMTP (25,587) server-first - HTTPS (443) opaque TLS - MYSQL (3306) server-first - PostgreSQL (5432) server-first - Memcached (11211) clients do not issue any preamble, which breaks detection
proxy.outboundConnectTimeoutstring"1000ms"Maximum time allowed for the proxy to establish an outbound TCP connection
proxy.ports.adminint4191Admin port for the proxy container
proxy.ports.controlint4190Control port for the proxy container
proxy.ports.inboundint4143Inbound port for the proxy container
proxy.ports.outboundint4140Outbound port for the proxy container
proxy.requireIdentityOnInboundPortsstring""
proxy.resources.cpu.limitstring""Maximum amount of CPU units that the proxy can use
proxy.resources.cpu.requeststring""Amount of CPU units that the proxy requests
proxy.resources.memory.limitstring""Maximum amount of memory that the proxy can use
proxy.resources.memory.requeststring""Maximum amount of memory that the proxy requests
proxy.uidint2102User id under which the proxy runs
proxy.waitBeforeExitSecondsint0If set the proxy sidecar will stay alive for at least the given period before receiving SIGTERM signal from Kubernetes but no longer than pod's terminationGracePeriodSeconds. See Lifecycle hooks for more info on container lifecycle hooks.
proxyInit.closeWaitTimeoutSecsint0
proxyInit.ignoreInboundPortsstring""Default set of inbound ports to skip via itpables
proxyInit.ignoreOutboundPortsstring""Default set of outbound ports to skip via itpables
proxyInit.image.namestring"cr.l5d.io/linkerd/proxy-init"Docker image for the proxy-init container
proxyInit.image.pullPolicystringimagePullPolicyPull policy for the proxy-init container Docker image
proxyInit.image.versionstring"v1.3.11"Tag for the proxy-init container Docker image
proxyInit.resources.cpu.limitstring"100m"Maximum amount of CPU units that the proxy-init container can use
proxyInit.resources.cpu.requeststring"10m"Amount of CPU units that the proxy-init container requests
proxyInit.resources.memory.limitstring"50Mi"Maximum amount of memory that the proxy-init container can use
proxyInit.resources.memory.requeststring"10Mi"Amount of memory that the proxy-init container requests
proxyInit.xtMountPath.mountPathstring"/run"
proxyInit.xtMountPath.namestring"linkerd-proxy-init-xtables-lock"
proxyInjector.caBundlestring""Bundle of CA certificates for proxy injector. If not provided then Helm will use the certificate generated for proxyInjector.crtPEM. If proxyInjector.externalSecret is set to true, this value must be set, as no certificate will be generated.
proxyInjector.crtPEMstring""Certificate for the proxy injector. If not provided then Helm will generate one.
proxyInjector.externalSecretboolfalseDo not create a secret resource for the profileValidator webhook. If this is set to true, the value proxyInjector.caBundle must be set (see below)
proxy

Deploy linkerd2 with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has linkerd2 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 chartlinkerd2 is pinned at v2.10.2 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