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
admin.allow.ipListlist["127.0.0.1/24"]The client IP CIDR allowed to access Apache APISIX Admin API service.
admin.corsbooltrueAdmin API support CORS response headers
admin.credentialsobject{"admin":"edd1c9f034335f136f87ad84b625c8f1","secretName":"","viewer":"4054f7cf07e344346cd3f287985e76a2"}Admin API credentials
admin.credentials.adminstring"edd1c9f034335f136f87ad84b625c8f1"Apache APISIX admin API admin role credentials
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.
admin.credentials.viewerstring"4054f7cf07e344346cd3f287985e76a2"Apache APISIX admin API viewer role credentials
admin.enabledbooltrueEnable Admin API
admin.externalIPslist[]IPs for which nodes in the cluster will also accept traffic for the servic
admin.ingressobject{"annotations":{},"enabled":false,"hosts":[{"host":"apisix-admin.local","paths":["/apisix"]}],"tls":[]}Using ingress access Apache APISIX admin service
admin.ingress.annotationsobject{}Ingress annotations
admin.ipstring"0.0.0.0"which ip to listen on for Apache APISIX admin API. Set to "[::]" when on IPv6 single stack
admin.portint9180which port to use for Apache APISIX admin API
admin.servicePortint9180Service port to use for Apache APISIX admin API
admin.typestring"ClusterIP"admin service type
apisix.affinityobject{}Set affinity for Apache APISIX deploy
apisix.customLuaSharedDictslist[]Add custom lua_shared_dict settings, click here to learn the format of a shared dict
apisix.customizedConfigobject{}If apisix.enableCustomizedConfig is true, full customized config.yaml. Please note that other settings about APISIX config will be ignored
apisix.enableCustomizedConfigboolfalseEnable full customized config.yaml
apisix.enableIPv6booltrueEnable nginx IPv6 resolver
apisix.enableServerTokensbooltrueWhether the APISIX version number should be shown in Server header
apisix.enabledbooltrueEnable or disable Apache APISIX itself Set it to false and ingress-controller.enabled=true will deploy only ingress-controller
apisix.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
apisix.hostNetworkboolfalse
apisix.httpRouterstring"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.image.pullPolicystring"IfNotPresent"Apache APISIX image pull policy
apisix.image.repositorystring"apache/apisix"Apache APISIX image repository
apisix.image.tagstring"3.3.0-debian"Apache APISIX image tag Overrides the image tag whose default is the chart appVersion.
apisix.kindstring"Deployment"Use a DaemonSet or Deployment
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.nodeSelectorobject{}Node labels for Apache APISIX pod assignment
apisix.podAnnotationsobject{}Annotations to add to each pod
apisix.podDisruptionBudgetobject{"enabled":false,"maxUnavailable":1,"minAvailable":"90%"}See https://kubernetes.io/docs/tasks/run-application/configure-pdb/ for more details
apisix.podDisruptionBudget.enabledboolfalseEnable or disable podDisruptionBudget
apisix.podDisruptionBudget.maxUnavailableint1Set the maxUnavailable of podDisruptionBudget
apisix.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
apisix.podSecurityContextobject{}Set the securityContext for Apache APISIX pods
apisix.priorityClassNamestring""Set priorityClassName for Apache APISIX pods
apisix.replicaCountint1kind is DaemonSet, replicaCount not become effective
apisix.resourcesobject{}Set pod resource requests & limits
apisix.securityContextobject{}Set the securityContext for Apache APISIX container
apisix.setIDFromPodUIDboolfalseUse Pod metadata.uid as the APISIX id.
apisix.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.
apisix.tolerationslist[]List of node taints to tolerate
autoscaling.enabledboolfalse
autoscaling.maxReplicasint100
autoscaling.minReplicasint1
autoscaling.targetCPUUtilizationPercentageint80
autoscaling.targetMemoryUtilizationPercentageint80
autoscaling.versionstring"v2"HPA version, the value is “v2” or “v2beta1”, default “v2”
configurationSnippetobject{"httpAdmin":"","httpEnd":"","httpSrv":"","httpStart":"","main":"","stream":""}Custom configuration snippet.
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.
customPlugins.enabledboolfalseWhether to configure some custom plugins
customPlugins.luaPathstring"/opts/custom_plugins/?.lua"the lua_path that tells APISIX where it can find plugins, note the last ‘;’ is required.
customPlugins.plugins[0]object{"attrs":{},"configMap":{"mounts":[{"key":"the-file-name","path":"mount-path"}],"name":"configmap-name"},"name":"plugin-name"}plugin name.
customPlugins.plugins[0].attrsobject{}plugin attrs
customPlugins.plugins[0].configMapobject{"mounts":[{"key":"the-file-name","path":"mount-path"}],"name":"configmap-name"}plugin codes can be saved inside configmap object.
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.
customPlugins.plugins[0].configMap.namestring"configmap-name"name of configmap.
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
deployment.certsobject{"cert":"","cert_key":"","certsSecret":"","mTLSCACert":"","mTLSCACertSecret":""}certs used for certificates in decoupled mode
deployment.certs.certstring""cert name in certsSecret
deployment.certs.cert_keystring""cert key in certsSecret
deployment.certs.certsSecretstring""secret name used for decoupled mode
deployment.certs.mTLSCACertstring""mTLS CA cert filename in mTLSCACertSecret
deployment.certs.mTLSCACertSecretstring""trusted_ca_cert name in certsSecret
deployment.controlPlaneobject{"cert":"","certKey":"","certsSecret":"","confServerPort":"9280"}used for control_plane deployment mode
deployment.controlPlane.certstring""conf Server CA cert name in certsSecret
deployment.controlPlane.certKeystring""conf Server cert key name in certsSecret
deployment.controlPlane.certsSecretstring""secret name used by conf Server
deployment.controlPlane.confServerPortstring"9280"conf Server address
deployment.dataPlaneobject{"controlPlane":{"host":[],"prefix":"/apisix","timeout":30}}used for data_plane deployment mode
deployment.dataPlane.controlPlane.hostlist[]The hosts of the control_plane used by the data_plane
deployment.dataPlane.controlPlane.prefixstring"/apisix"The prefix of the control_plane used by the data_plane
deployment.dataPlane.controlPlane.timeoutint30Timeout when the data plane connects to the control plane
deployment.modestring"traditional"Apache APISIX deployment mode Optional: traditional, decoupled ref: https://apisix.apache.org/docs/apisix/deployment-modes/
deployment.rolestring"traditional"Deployment role Optional: traditional, data_plane, control_plane ref: https://apisix.apache.org/docs/apisix/deployment-modes/
discovery.enabledboolfalseEnable or disable Apache APISIX integration service discovery
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
dns.resolvers[0]string"127.0.0.1"
dns.resolvers[1]string"172.20.0.10"
dns.resolvers[2]string"114.114.114.114"
dns.resolvers[3]string"223.5.5.5"
dns.resolvers[4]string"1.1.1.1"
dns.resolvers[5]string"8.8.8.8"
dns.timeoutint5
dns.validityint30
etcdobject{"auth":{"rbac":{"create":false,"rootPassword":""},"tls":{"certFilename":"","certKeyFilename":"","enabled":false,"existingSecret":"","sni":"","verify":true}},"enabled":true,"host":["http://etcd.host:2379"],"password":"","prefix":"/apisix","replicaCount":3,"service":{"port":2379},"timeout":30,"user":""}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.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.
etcd.passwordstring""if etcd.enabled is false, password for external etcd. If etcd.enabled is true, use etcd.auth.rbac.rootPassword instead.
etcd.prefixstring"/apisix"apisix configurations prefix
etcd.timeoutint30Set the timeout value in seconds for subsequent socket operations from apisix to etcd cluster
etcd.userstring""if etcd.enabled is false, username for external etcd. If etcd.enabled is true, use etcd.auth.rbac.rootPassword instead.
extPlugin.cmdlist["/path/to/apisix-plugin-runner/runner","run"]the command and its arguements to run as a subprocess
extPlugin.enabledboolfalseEnable External Plugins. See external plugin
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""
gateway.externalIPslist[]
gateway.externalTrafficPolicystring"Cluster"
gateway.httpobject{"additionalContainerPorts":[],"containerPort":9080,"enabled":true,"servicePort":80}Apache APISIX service settings for http
gateway.http.additionalContainerPortslist[]Support multiple http ports, See Configuration
gateway.ingressobject{"annotations":{},"enabled":false,"hosts":[{"host":"apisix.local","paths":[]}],"tls":[]}Using ingress access Apache APISIX service
gateway.ingress.annotationsobject{}Ingress annotations
gateway.labelsOverrideobject{}Override default labels assigned to Apache APISIX gateway resources
gateway.streamobject{"enabled":false,"only":false,"tcp":[],"udp":[]}Apache APISIX service settings for stream. L4 proxy (TCP/UDP)
gateway.tlsobject{"additionalContainerPorts":[],"certCAFilename":"","containerPort":9443,"enabled":false,"existingCASecret":"","http2":{"enabled":true},"servicePort":443,"sslProtocols":"TLSv1.2 TLSv1.3"}Apache APISIX service settings for tls
gateway.tls.additionalContainerPortslist[]Support multiple https ports, See Configuration
gateway.tls.certCAFilenamestring""Filename be used in the gateway.tls.existingCASecret
gateway.tls.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)
gateway.tls.sslProtocolsstring"TLSv1.2 TLSv1.3"TLS protocols allowed to use.
gateway.typestring"NodePort"Apache APISIX service type for user access itself
global.imagePullSecretslist[]Global Docker registry secret names as an array
ingress-controllerobject{"config":{"apisix":{"adminAPIVersion":"v3"}},"enabled":false}Ingress controller configuration
initContainer.imagestring"busybox"Init container image
initContainer.tagfloat1.28Init container tag
logs.accessLogstring"/dev/stdout"Access log path
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
logs.accessLogFormatEscapestring"default"Allows setting json or default characters escaping in variables
logs.enableAccessLogbooltrueEnable access log or not, default true
logs.errorLogstring"/dev/stderr"Error log path
logs.errorLogLevelstring"warn"Error log level
nameOverridestring""
nginx.enableCPUAffinitybooltrue
nginx.envslist[]
nginx.workerConnectionsstring"10620"
nginx.workerProcessesstring"auto"
nginx.workerRlimitNofilestring"20480"
pluginAttrsobject{}Set APISIX plugin attributes, see config-default.yaml for more details
pluginslist[]Customize the list of APISIX plugins to enable. By default, APISIX's default plugins are automatically used. See config-default.yaml
rbac.createboolfalse
serviceAccount.annotationsobject{}
serviceAccount.createboolfalse
serviceAccount.namestring""
serviceMonitorobject{"annotations":{},"containerPort":9091,"enabled":false,"interval":"15s","labels":{},"metricPrefix":"apisix_","name":"","namespace":"","path":"/apisix/prometheus/metrics"}Observability configuration. ref: https://apisix.apache.org/docs/apisix/plugins/prometheus/
serviceMonitor.annotationsobject{}@param serviceMonitor.annotations ServiceMonitor annotations
serviceMonitor.containerPortint9091container port where the metrics are exposed
serviceMonitor.enabledboolfalseEnable or disable Apache APISIX serviceMonitor
serviceMonitor.intervalstring"15s"interval at which metrics should be scraped
serviceMonitor.labelsobject{}@param serviceMonitor.labels ServiceMonitor extra labels
serviceMonitor.metricPrefixstring"apisix_"prefix of the metrics
serviceMonitor.namestring""name of the serviceMonitor, by default, it is the same as the apisix fullname
serviceMonitor.namespacestring""namespace where the serviceMonitor is deployed, by default, it is the same as the namespace of the apisix
serviceMonitor.pathstring"/apisix/prometheus/metrics"path of the metrics endpoint
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
updateStrategyobject{}
vault.enabledboolfalseEnable or disable the vault integration
vault.hoststring""The host address where the vault server is running.
vault.prefixstring""Prefix allows you to better enforcement of policies.
vault.timeoutint10HTTP timeout for each request.
vault.tokenstring""The generated token from vault instance that can grant access to read data from the vault.
wasmPlugins.enabledboolfalseEnable Wasm Plugins. See wasm plugin
wasmPlugins.pluginslist[]