apisix

by KubeSphere

Helm chartv0.7.2App 2.10.0Verified publisher

A Helm chart for Apache APISIX

About this chart

Apache APISIX for Kubernetes

Apache APISIX is a dynamic, real-time, high-performance API gateway.

APISIX provides rich traffic management features such as load balancing, dynamic upstream, canary release, circuit breaking, authentication, observability, and more.

You can use Apache APISIX to handle traditional north-south traffic, as well as east-west traffic between services. It can also be used as a k8s ingress controller.

This chart bootstraps all the components needed to run Apache APISIX on a Kubernetes Cluster using Helm.

TL;DR

helm repo add apisix https://charts.apiseven.com
helm repo update

helm install apisix/apisix --generate-name

Prerequisites

  • Kubernetes v1.14+
  • Helm v3+

Install

To install the chart with the release name my-apisix:

helm repo add apisix https://charts.apiseven.com
helm repo update

helm install my-apisix apisix/apisix

Uninstall

To uninstall/delete a Helm release my-apisix:

helm delete my-apisix

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

Parameters

The following tables lists the configurable parameters of the apisix chart and their default values per section/component:

Global parameters

ParameterDescriptionDefault
global.imagePullSecretsGlobal Docker registry secret names as an array[] (does not add image pull secrets to deployed pods)

apisix parameters

ParameterDescriptionDefault
apisix.enabledEnable or disable Apache APISIX itselftrue
apisix.image.repositoryApache APISIX image repositoryapache/apisix
apisix.image.tagApache APISIX image tag{TAG_NAME} (the latest Apache APISIX image tag)
apisix.image.pullPolicyApache APISIX image pull policyIfNotPresent
apisix.replicaCountApache APISIX deploy replica count1
apisix.podAnnotationsAnnotations to add to each pod{}
apisix.podSecurityContextSet the securityContext for Apache APISIX pods{}
apisix.securityContextSet the securityContext for Apache APISIX container{}
apisix.resourcesSet pod resource requests & limits{}
apisix.nodeSelectorNode labels for Apache APISIX pod assignment{}
apisix.tolerationsList of node taints to tolerate{}
apisix.affinitySet affinity for Apache APISIX deploy{}
apisix.podAntiAffinity.enabledEnable or disable podAntiAffinityfalse

gateway parameters

Apache APISIX service parameters, this determines how users can access itself.

ParameterDescriptionDefault
gateway.typeApache APISIX service type for user access itselfNodePort
gateway.externalTrafficPolicySetting how the Service route external trafficCluster
gateway.httpApache APISIX service settings for http
gateway.tlsApache APISIX service settings for tls
gateway.tls.existingCASecretSpecifies the name of Secret contains trusted CA certificates in the PEM format used to verify the certificate when APISIX needs to do SSL/TLS handshaking with external services (e.g. etcd)""
gateway.tls.certCAFilenamefilename be used in the gateway.tls.existingCASecret""
gateway.streamApache APISIX service settings for stream
gateway.ingressUsing ingress access Apache APISIX service

admin parameters

ParameterDescriptionDefault
admin.enabledEnable or disable Apache APISIX admin APItrue
admin.portwhich port to use for Apache APISIX admin API9180
admin.servicePortService port to use for Apache APISIX admin API9180
admin.typeApache APISIX admin API service typeClusterIP
admin.externalIPsIPs for which nodes in the cluster will also accept traffic for the servic[]
admin.corsApache APISIX admin API support CORS response headerstrue
admin.credentials.adminApache APISIX admin API admin role credentialsedd1c9f034335f136f87ad84b625c8f1
admin.credentials.viewerApache APISIX admin API viewer role credentials4054f7cf07e344346cd3f287985e76a2
admin.allow.ipListthe IP range allowed to Apache APISIX admin APItrue

custom configuration snippet parameters

ParameterDescriptionDefault
configurationSnippet.mainAdd custom Nginx configuration (main block) to nginx.conf{}
configurationSnippet.httpStartAdd custom Nginx configuration (http block) to nginx.conf{}
configurationSnippet.httpEndAdd custom Nginx configuration (http block) to nginx.conf, will be put at the bottom of http block{}
configurationSnippet.httpSrvAdd custom Nginx configuration (server block) to nginx.conf{}
configurationSnippet.httpAdminAdd custom Nginx configuration (Admin API server block) to nginx.conf{}
configurationSnippet.streamAdd custom Nginx configuration (stream block) to nginx.conf{}

etcd parameters

ParameterDescriptionDefault
etcd.enableduse built-in etcdtrue
etcd.hostif etcd.enabled is false, use external etcd, support multiple address, if your etcd cluster enables TLS, please use https scheme, e.g. https://127.0.0.1:2379.["http://etcd.host:2379"]
etcd.prefixapisix configurations prefix/apisix
etcd.timeoutSet the timeout value in seconds for subsequent socket operations from apisix to etcd cluster30
etcd.auth.rbac.enabledenable auth for etcdfalse
etcd.auth.rbac.userroot username for etcd""
etcd.auth.rbac.passwordroot password for etcd""
etcd.auth.tls.enabledenable etcd client certificatefalse
etcd.auth.tls.existingSecretname of the secret contains etcd client cert""
etcd.auth.tls.certFilenameetcd client cert filename using in etcd.auth.tls.existingSecret""
etcd.auth.tls.certKeyFilenameetcd client cert key filename using in etcd.auth.tls.existingSecret""
etcd.auth.tls.verifywhether to verify the etcd endpoint certificate when setup a TLS connection to etcdtrue

If etcd.enabled is true, set more values of bitnami/etcd helm chart use etcd as prefix

plugins and stream_plugins parameters

Default enabled plugins. See configmap template for details.

dashboard parameters

Configurations for apisix-dashboard sub chart.

ingress-controller parameters

Configurations for Apache APISIX ingress-controller sub chart.

Deploy apisix with OpenTenant

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