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.

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 [RELEASE_NAME] apisix/apisix --namespace ingress-apisix --create-namespace

Uninstall

To uninstall/delete a Helm release my-apisix:

helm delete [RELEASE_NAME] --namespace ingress-apisix

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

Parameters

Values

KeyTypeDefaultDescription
affinityobject{}Set affinity for Apache APISIX deploy
apisix.admin.allow.ipListlist["127.0.0.1/24"]The client IP CIDR allowed to access Apache APISIX Admin API service.
apisix.admin.corsbooltrueAdmin API support CORS response headers
apisix.admin.credentialsobject{"admin":"edd1c9f034335f136f87ad84b625c8f1","secretName":"","viewer":"4054f7cf07e344346cd3f287985e76a2"}Admin API credentials
apisix.admin.credentials.adminstring"edd1c9f034335f136f87ad84b625c8f1"Apache APISIX admin API admin role credentials
apisix.admin.credentials.secretNamestring""The APISIX Helm chart supports storing user credentials in a secret. The secret needs to contain two keys, admin and viewer, with their respective values set.
apisix.admin.credentials.viewerstring"4054f7cf07e344346cd3f287985e76a2"Apache APISIX admin API viewer role credentials
apisix.admin.enabledbooltrueEnable Admin API
apisix.admin.externalIPslist[]IPs for which nodes in the cluster will also accept traffic for the servic
apisix.admin.ingressobject{"annotations":{},"enabled":false,"hosts":[{"host":"apisix-admin.local","paths":["/apisix"]}],"tls":[]}Using ingress access Apache APISIX admin service
apisix.admin.ingress.annotationsobject{}Ingress annotations
apisix.admin.ipstring"0.0.0.0"which ip to listen on for Apache APISIX admin API. Set to "[::]" when on IPv6 single stack
apisix.admin.portint9180which port to use for Apache APISIX admin API
apisix.admin.servicePortint9180Service port to use for Apache APISIX admin API
apisix.admin.typestring"ClusterIP"admin service type
apisix.customPluginsobject{"enabled":false,"luaPath":"/opts/custom_plugins/?.lua","plugins":[{"attrs":{},"configMap":{"mounts":[{"key":"the-file-name","path":"mount-path"}],"name":"configmap-name"},"name":"plugin-name"}]}customPlugins allows you to mount your own HTTP plugins.
apisix.customPlugins.enabledboolfalseWhether to configure some custom plugins
apisix.customPlugins.luaPathstring"/opts/custom_plugins/?.lua"the lua_path that tells APISIX where it can find plugins, note the last ‘;’ is required.
apisix.customPlugins.plugins[0]object{"attrs":{},"configMap":{"mounts":[{"key":"the-file-name","path":"mount-path"}],"name":"configmap-name"},"name":"plugin-name"}plugin name.
apisix.customPlugins.plugins[0].attrsobject{}plugin attrs
apisix.customPlugins.plugins[0].configMapobject{"mounts":[{"key":"the-file-name","path":"mount-path"}],"name":"configmap-name"}plugin codes can be saved inside configmap object.
apisix.customPlugins.plugins[0].configMap.mountslist[{"key":"the-file-name","path":"mount-path"}]since keys in configmap is flat, mountPath allows to define the mount path, so that plugin codes can be mounted hierarchically.
apisix.customPlugins.plugins[0].configMap.namestring"configmap-name"name of configmap.
apisix.deployment.modestring"traditional"Apache APISIX deployment mode Optional: traditional, decoupled, standalone ref: https://apisix.apache.org/docs/apisix/deployment-modes/
apisix.deployment.rolestring"traditional"Deployment role Optional: traditional, data_plane, control_plane ref: https://apisix.apache.org/docs/apisix/deployment-modes/
apisix.discovery.enabledboolfalseEnable or disable Apache APISIX integration service discovery
apisix.discovery.registryobject{}Registry is the same to the one in APISIX config-default.yaml, and refer to such file for more setting details. also refer to this documentation for integration service discovery
apisix.dns.resolvers[0]string"127.0.0.1"
apisix.dns.resolvers[1]string"172.20.0.10"
apisix.dns.resolvers[2]string"114.114.114.114"
apisix.dns.resolvers[3]string"223.5.5.5"
apisix.dns.resolvers[4]string"1.1.1.1"
apisix.dns.resolvers[5]string"8.8.8.8"
apisix.dns.timeoutint5
apisix.dns.validityint30
apisix.enableIPv6booltrueEnable nginx IPv6 resolver
apisix.enableServerTokensbooltrueWhether the APISIX version number should be shown in Server header
apisix.extPlugin.cmdlist["/path/to/apisix-plugin-runner/runner","run"]the command and its arguements to run as a subprocess
apisix.extPlugin.enabledboolfalseEnable External Plugins. See external plugin
apisix.fullCustomConfig.configobject{}If apisix.fullCustomConfig.enabled is true, full customized config.yaml. Please note that other settings about APISIX config will be ignored
apisix.fullCustomConfig.enabledboolfalseEnable full customized config.yaml
apisix.luaModuleHookobject{"configMapRef":{"mounts":[{"key":"","path":""}],"name":""},"enabled":false,"hookPoint":"","luaPath":""}Whether to add a custom lua module
apisix.luaModuleHook.configMapRefobject{"mounts":[{"key":"","path":""}],"name":""}configmap that stores the codes
apisix.luaModuleHook.configMapRef.mounts[0]object{"key":"","path":""}Name of the ConfigMap key, for setting the mapping relationship between ConfigMap key and the lua module code path.
apisix.luaModuleHook.configMapRef.mounts[0].pathstring""Filepath of the plugin code, for setting the mapping relationship between ConfigMap key and the lua module code path.
apisix.luaModuleHook.configMapRef.namestring""Name of the ConfigMap where the lua module codes store
apisix.luaModuleHook.hookPointstring""the hook module which will be used to inject third party code into APISIX use the lua require style like: “module.say_hello”
apisix.luaModuleHook.luaPathstring""extend lua_package_path to load third party code
apisix.nginx.configurationSnippetobject{"httpAdmin":"","httpEnd":"","httpSrv":"","httpStart":"","main":"","stream":""}Custom configuration snippet.
apisix.nginx.customLuaSharedDictslist[]Add custom lua_shared_dict settings, click here to learn the format of a shared dict
apisix.nginx.enableCPUAffinitybooltrue
apisix.nginx.envslist[]
apisix.nginx.keepaliveTimeoutstring"60s"Timeout during which a keep-alive client connection will stay open on the server side.
apisix.nginx.logs.accessLogstring"/dev/stdout"Access log path
apisix.nginx.logs.accessLogFormatstring"$remote_addr - $remote_user [$time_local] $http_host \\\"$request\\\" $status $body_bytes_sent $request_time \\\"$http_referer\\\" \\\"$http_user_agent\\\" $upstream_addr $upstream_status $upstream_response_time \\\"$upstream_scheme://$upstream_host$upstream_uri\\\""Access log format
apisix.nginx.logs.accessLogFormatEscapestring"default"Allows setting json or default characters escaping in variables
apisix.nginx.logs.enableAccessLogbooltrueEnable access log or not, default true
apisix.nginx.logs.errorLogstring"/dev/stderr"Error log path
apisix.nginx.logs.errorLogLevelstring"warn"Error log level
apisix.nginx.workerConnectionsstring"10620"
apisix.nginx.workerProcessesstring"auto"
apisix.nginx.workerRlimitNofilestring"20480"
apisix.pluginAttrsobject{}Set APISIX plugin attributes, see config-default.yaml for more details
apisix.pluginslist[]Customize the list of APISIX plugins to enable. By default, APISIX's default plugins are automatically used. See config-default.yaml
apisix.prometheus.containerPortint9091container port where the metrics are exposed
apisix.prometheus.enabledboolfalse
apisix.prometheus.metricPrefixstring"apisix_"prefix of the metrics
apisix.prometheus.pathstring"/apisix/prometheus/metrics"path of the metrics endpoint
apisix.router.httpstring"radixtree_host_uri"Defines how apisix handles routing: - radixtree_uri: match route by uri(base on radixtree) - radixtree_host_uri: match route by host + uri(base on radixtree) - radixtree_uri_with_parameter: match route by uri with parameters
apisix.setIDFromPodUIDboolfalseUse Pod metadata.uid as the APISIX id.
apisix.ssl.additionalContainerPortslist[]Support multiple https ports, See Configuration
apisix.ssl.certCAFilenamestring""Filename be used in the apisix.ssl.existingCASecret
apisix.ssl.containerPortint9443
apisix.ssl.enabledboolfalse
apisix.ssl.existingCASecretstring""Specifies 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)
apisix.ssl.fallbackSNIstring""Define SNI to fallback if none is presented by client
apisix.ssl.http2.enabledbooltrue
apisix.ssl.sslProtocolsstring"TLSv1.2 TLSv1.3"TLS protocols allowed to use.
apisix.stream_pluginslist[]Customize the list of APISIX stream_plugins to enable. By default, APISIX's default stream_plugins are automatically used. See config-default.yaml
apisix.vault.enabledboolfalseEnable or disable the vault integration
apisix.vault.hoststring""The host address where the vault server is running.
apisix.vault.prefixstring""Prefix allows you to better enforcement of policies.
apisix.vault.timeoutint10HTTP timeout for each request.
apisix.vault.tokenstring""The generated token from vault instance that can grant access to read data from the vault.
apisix.wasm.enabledboolfalseEnable Wasm Plugins. See wasm plugin
apisix.wasm.pluginslist[]
autoscaling.enabledboolfalse
autoscaling.maxReplicasint100
autoscaling.minReplicasint1
autoscaling.targetCPUUtilizationPercentageint80
autoscaling.targetMemoryUtilizationPercentageint80
autoscaling.versionstring"v2"HPA version, the value is “v2” or “v2beta1”, default “v2”
dashboard.config.conf.etcd.endpointslist["apisix-etcd:2379"]Supports defining multiple etcd host addresses for an etcd cluster
dashboard.config.conf.etcd.passwordstringnilSpecifies etcd basic auth password if enable etcd auth
dashboard.config.conf.etcd.prefixstring"/apisix"apisix configurations prefix
dashboard.config.conf.etcd.usernamestringnilSpecifies etcd basic auth username if enable etcd auth
dashboard.enabledboolfalse
etcdobject{"auth":{"rbac":{"create":false,"rootPassword":""},"tls":{"certFilename":"","certKeyFilename":"","enabled":false,"existingSecret":"","sni":"","verify":true}},"enabled":true,"prefix":"/apisix","replicaCount":3,"service":{"port":2379},"timeout":30}etcd configuration use the FQDN address or the IP of the etcd
etcd.authobject{"rbac":{"create":false,"rootPassword":""},"tls":{"certFilename":"","certKeyFilename":"","enabled":false,"existingSecret":"","sni":"","verify":true}}if etcd.enabled is true, set more values of bitnami/etcd helm chart
etcd.auth.rbac.createboolfalseNo authentication by default. Switch to enable RBAC authentication
etcd.auth.rbac.rootPasswordstring""root password for etcd. Requires etcd.auth.rbac.create to be true.
etcd.auth.tls.certFilenamestring""etcd client cert filename using in etcd.auth.tls.existingSecret
etcd.auth.tls.certKeyFilenamestring""etcd client cert key filename using in etcd.auth.tls.existingSecret
etcd.auth.tls.enabledboolfalseenable etcd client certificate
etcd.auth.tls.existingSecretstring""name of the secret contains etcd client cert
etcd.auth.tls.snistring""specify the TLS Server Name Indication extension, the ETCD endpoint hostname will be used when this setting is unset.
etcd.auth.tls.verifybooltruewhether to verify the etcd endpoint certificate when setup a TLS connection to etcd
etcd.enabledbooltrueinstall etcd(v3) by default, set false if do not want to install etcd(v3) together
etcd.prefixstring"/apisix"apisix configurations prefix
etcd.timeoutint30Set the timeout value in seconds for subsequent socket operations from apisix to etcd cluster
externalEtcdobject{"existingSecret":"","host":["http://etcd.host:2379"],"password":"","secretPasswordKey":"etcd-root-password","user":"root"}external etcd configuration. If etcd.enabled is false, these configuration will be used.
externalEtcd.existingSecretstring""if externalEtcd.existingSecret is the name of secret containing the external etcd password
externalEtcd.hostlist["http://etcd.host:2379"]if 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.
externalEtcd.passwordstring""if etcd.enabled is false and externalEtcd.existingSecret is empty, externalEtcd.password is the passsword for external etcd.
externalEtcd.secretPasswordKeystring"etcd-root-password"externalEtcd.secretPasswordKey Key inside the secret containing the external etcd password
externalEtcd.userstring"root"if etcd.enabled is false, user for external etcd. Set empty to disable authentication
extraContainerslist[]Additional containers, See Kubernetes containers for the detail.
extraDeploylist[]Additional Kubernetes resources to deploy with the release.
extraEnvVarslist[]extraEnvVars An array to add extra env vars e.g: extraEnvVars: - name: FOO value: “bar” - name: FOO2 valueFrom: secretKeyRef: name: SECRET_NAME key: KEY
extraInitContainerslist[]Additional initContainers, See Kubernetes initContainers for the detail.
extraVolumeMountslist[]Additional volume, See Kubernetes Volumes for the detail.
extraVolumeslist[]Additional volume, See Kubernetes Volumes for the detail.
fullnameOverridestring""
global.imagePullSecretslist[]Global Docker registry secret names as an array
hostNetworkboolfalse
image.pullPolicystring"IfNotPresent"Apache APISIX image pull policy
image.repositorystring"apache/apisix"Apache APISIX image repository
image.tagstring"3.8.0-debian"Apache APISIX image tag Overrides the image tag whose default is the chart appVersion.
ingressobject{"annotations":{},"enabled":false,"hosts":[{"host":"apisix.local","paths":[]}],"servicePort":null,"tls":[]}Using ingress access Apache APISIX service
ingress-controllerobject{"config":{"apisix":{"adminAPIVersion":"v3"}},"enabled":false}Ingress controller configuration
ingress.annotationsobject{}Ingress annotations
ingress.servicePortnumbernilService port to send traffic. Defaults to service.http.servicePort.
initContainer.imagestring"busybox"Init container image
initContainer.tagfloat1.28Init container tag
metricsobject{"serviceMonitor":{"annotations":{},"enabled":false,"interval":"15s","labels":{},"name":"","namespace":""}}Observability configuration.
metrics.serviceMonitor.annotationsobject{}@param serviceMonitor.annotations ServiceMonitor annotations
metrics.serviceMonitor.enabledboolfalseEnable or disable Apache APISIX serviceMonitor
metrics.serviceMonitor.intervalstring"15s"interval at which metrics should be scraped
metrics.serviceMonitor.labelsobject{}@param serviceMonitor.labels ServiceMonitor extra labels
metrics.serviceMonitor.namestring""name of the serviceMonitor, by default, it is the same as the apisix fullname
metrics.serviceMonitor.namespacestring""namespace where the serviceMonitor is deployed, by default, it is the same as the namespace of the apisix
nameOverridestring""
nodeSelectorobject{}Node labels for Apache APISIX pod assignment
podAnnotationsobject{}Annotations to add to each pod
podDisruptionBudgetobject{"enabled":false,"maxUnavailable":1,"minAvailable":"90%"}See https://kubernetes.io/docs/tasks/run-application/configure-pdb/ for more details
podDisruptionBudget.enabledboolfalseEnable or disable podDisruptionBudget
podDisruptionBudget.maxUnavailableint1Set the maxUnavailable of podDisruptionBudget
podDisruptionBudget.minAvailablestring"90%"Set the minAvailable of podDisruptionBudget. You can specify only one of maxUnavailable and minAvailable in a single PodDisruptionBudget. See Specifying a Disruption Budget for your Application for more details
podSecurityContextobject{}Set the securityContext for Apache APISIX pods
priorityClassNamestring""Set priorityClassName for Apache APISIX pods
rbac.createboolfalse
replicaCountint1if useDaemonSet is true or autoscaling.enabled is true, replicaCount not become effective
resourcesobject{}Set pod resource requests & limits
securityContextobject{}Set the securityContext for Apache APISIX container
service.externalIPslist[]
service.externalTrafficPolicystring"Cluster"
service.httpobject{"additionalContainerPorts":[],"containerPort":9080,"enabled":true,"servicePort":80}Apache APISIX service settings for http
service.http.additionalContainerPortslist[]Support multiple http ports, See Configuration
service.labelsOverrideobject{}Override default labels assigned to Apache APISIX gateway resources
service.streamobject{"enabled":false,"tcp":[],"udp":[]}Apache APISIX service settings for stream. L4 proxy (TCP/UDP)
service.tlsobject{"servicePort":443}Apache APISIX service settings for tls
service.typestring"NodePort"Apache APISIX service type for user access itself
serviceAccount.annotationsobject{}
serviceAccount.createboolfalse
serviceAccount.namestring""
timezonestring""timezone is the timezone where apisix uses. For example: “UTC” or “Asia/Shanghai” This value will be set on apisix container‘s environment variable TZ. You may need to set the timezone to be consistent with your local time zone, otherwise the apisix’s logs may used to retrieve event maybe in wrong timezone.
tolerationslist[]List of node taints to tolerate
updateStrategyobject{}
useDaemonSetboolfalseset false to use Deployment, set true to use DaemonSet