appmesh-gateway

by Helm

Helm chartv0.1.5App 1.0.0

App Mesh Gateway Helm chart for Kubernetes

About this chart

App Mesh Gateway

App Mesh Gateway Helm chart for Kubernetes.

Prerequisites

  • App Mesh CRDs
  • App Mesh Manager >= 1.0.0

Note App Mesh Gateway is a release candidate and can be used by enabling App Mesh preview features (available only in us-west-2 region).

To enable the preview features:

  • When configuring IAM policies, use appmesh-preview as the service name instead of appmesh
  • Install the App Mesh CRDs with:
kubectl apply -k github.com/aws/eks-charts/stable/appmesh-controller//crds?ref=preview
  • Install the App Mesh Controller chart from the preview branch
  • When configuring pods, add the following annotation so Envoy sidecars point to the preview as well:
annotations:
  appmesh.k8s.aws/preview: enabled

Installing the Chart

Add the EKS repository to Helm:

helm repo add eks https://aws.github.io/eks-charts

Create a namespace with injection enabled:

kubectl create ns appmesh-ingress
kubectl label namespace appmesh-ingress appmesh.k8s.aws/sidecarInjectorWebhook=enabled

Deploy the App Mesh Gateway in the appmesh-ingress namespace:

helm upgrade -i appmesh-gateway eks/appmesh-gateway \
--namespace appmesh-ingress

Find the NLB address:

kubectl get svc appmesh-gateway -n appmesh-ingress

The configuration section lists the parameters that can be configured during installation.

Configure auto-scaling

Install the Horizontal Pod Autoscaler (HPA) metrics server:

helm upgrade -i metrics-server stable/metrics-server \
--namespace kube-system \
--set args[0]=--kubelet-preferred-address-types=InternalIP

Configure CPU requests for the gateway pods and enable HPA by setting an average CPU utilization per pod:

helm upgrade -i appmesh-gateway eks/appmesh-gateway \
--namespace appmesh-ingress \
--set hpa.enabled=true \
--set hap.minReplicas=2 \
--set hap.maxReplicas=5 \
--set hap.averageUtilization=90 \
--set resources.requests.cpu=1000m

Uninstalling the Chart

To uninstall/delete the appmesh-gateway deployment:

$ helm delete appmesh-gateway -n appmesh-ingress

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration

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

ParameterDescriptionDefault
image.repositoryimage repository840364872350.dkr.ecr.us-west-2.amazonaws.com/aws-appmesh-envoy
image.tagimage tag<VERSION>
image.pullPolicyimage pull policyIfNotPresent
skipImageOverridewhen enabled the App Mesh injector will not override the Envoy imagefalse
service.typeservice typeLoadBalancer
service.portservice port80
service.annotationsservice annotationsNLB load balancer type
service.externalTrafficPolicywhen set to Local it preserves the client source IPCluster
appmesh.gatewaycreate a VirtualGateway objecttrue
appmesh.previewenable App Mesh Preview (us-west-2 only)false
resources.requests/cpupod CPU request100m
resources.requests/memorypod memory request64Mi
hpa.enabledenabled CPU based auto-scalingfalse
hpa.minReplicasminimum number of replicas2
hpa.maxReplicasmaximum number of replicas5
hpa.averageUtilizationCPU average utilization percentage90
hpa.enabledenabled CPU based auto-scalingfalse
podAntiAffinitysoft pod anti-affinity, one replica per nodetrue
podAnnotationsannotations to add to each pod{}
nodeSelectornode labels for pod assignment{}
tolerationslist of node taints to tolerate[]
rbac.pspEnabledIf true, create and use a restricted pod security policyfalse
serviceAccount.createIf true, create a new service accounttrue
serviceAccount.nameService account to be usedNone

Deploy appmesh-gateway with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has appmesh-gateway 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 chartappmesh-gateway is pinned at v0.1.5 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