tyk-stack
chart provides the default deployment of Tyk Self Managed on a Kubernetes cluster. It will deploy all required Tyk components with the settings provided in the values.yaml file.
Component | Enabled by Default | Flag |
---|---|---|
Tyk Gateway | true | n/a |
Tyk Dashboard | true | n/a |
Tyk Pump | false | global.components.pump |
Tyk Enterprise Developer Portal | false | global.components.devPortal |
Tyk Operator | false | global.components.operator |
image.tag
. You can find the list of version tags available from Docker hub.
For quick start guide, please see Quick Start with Helm Chart and PostgreSQL or Quick Start with Helm Chart and MongoDB.
tyk
with the release name tyk-stack
:
values.yaml
file and use -f [filename]
flag to override default values during installation.
Alternatively, you can use --set
flag to set it in Tyk installation. See Using Helm for examples.
To configure Tyk components, users can utilize both config files and environment variables. Notably, environment variables take precedence over config files. To maintain simplicity and consistency, the Tyk Helm Charts deploy components with an empty config file while setting container environment variables based on user-defined values. This approach ensures seamless integration with Kubernetes practices, allowing for efficient management of configurations. For a comprehensive overview of available configurations, please refer to the configuration documentation.
Bootstrapping Component | Description |
---|---|
bootstrap-pre-install | - Runs as a pre-install hook. - Validates the Tyk Dashboard license key to ensure proper installation prerequisites. |
bootstrap-post-install | - Executes post-installation. - Sets up an organization and admin user in the Tyk Dashboard. - Creates Kubernetes secrets required by Tyk Operator and Tyk Enterprise Portal. Note: If an existing organization and admin user are found in the database, the bootstrapping job will not set up a new organization and user. The Kubernetes secrets will not contain the expected Org ID or API key. Please update the Secret with existing credentials in this case. |
bootstrap-pre-delete | - Functions as a pre-delete hook. - Cleans up resources, ensuring no residual configurations remain post-uninstallation. |
helm install
and does not run during a helm upgrade
.global.components.bootstrap
is set to false
, only the dashboard license check will be performed.helm uninstall
and start the installation process anew.extraEnvs
section within the charts for further customization. Values set under extraEnvs
would take precedence over all configurations.
Example of setting extra environment variable to gateway:
SECRET_USERNAME
will be added to the Gateway container, with a value of backend-username
associated with the secret backend-user
. It is useful if you want to access secret data from Tyk Gateway configuration file (tyk.conf) or API definitions.
simple-redis
chart for POC purpose.
Set the following values after installing Redis:
Name | Description |
---|---|
global.redis.addrs | Redis addresses |
global.redis.pass | Redis password in plain text |
global.redis.passSecret.name | If global.redis.pass is not provided, you can store it in a secret and provide the secret name here |
global.redis.passSecret.keyName | key name to retrieve redis password from the secret |
tyk-redis-master.tyk.svc.cluster.local:6379
You can reference the password secret generated by Bitnami chart by --set global.redis.passSecret.name=tyk-redis
and --set global.redis.passSecret.keyName=redis-password
, or just set global.redis.pass=$REDIS_PASSWORD
Evaluation only: via simple-redis chart
Another option for Redis, to get started quickly, is to use our simple-redis chart.
simple-redis
in the same namespace by default. You do not need to set Redis address and password in values.yaml
.
global.mongo
and global.postgres
sections of the values.yaml file respectively.
If not, you can use these rather excellent charts provided by Bitnami to install MongoDB or PostgreSQL:
Mongo Installation
values.yaml
file.
PodDisruptionBudget
for MongoDB with an arbiter replica-count of 1. If you intend to perform system maintenance on the node where the MongoDB pod is running and this maintenance requires the node to be drained, then this action will be prevented due to the the replica count being 1.Increase the replica count in the helm chart deployment to a minimum of 2 to remedy this issue.global.mongo.mongoURL
and global.storageType
as below. You should replace password in the connection string with the MONGODB_ROOT_PASSWORD you obtain from the installation output notes.
values.yaml
file, some fields are considered confidential, such as APISecret
, connection strings, etc.
Declaring values for such fields as plain text might not be desired. Instead, for certain fields,
Kubernetes secrets can be referenced and the chart will define container environment variables using secret data.
This section describes how to use Kubernetes secrets to declare confidential fields.
Tyk Dashboard and Developer Portal Admin
If Tyk Dashboard bootstrapping is enabled, the admin user will be created according to the global.adminUser
field.
All admin credentials can also be set through Kubernetes secret.
global.adminUser.useSecretName
is declared, it takes precedence over global.adminUser.firstName
,
global.adminUser.lastName
, global.adminUser.email
and global.adminUser.password
.If global.adminUser.useSecretName
is in use, please add all keys mentioned below to the secret.global.adminUser.firstName
as a plain text or Kubernetes secret which includes adminUserFirstName
key in it. Then, this secret must be referenced via global.adminUser.useSecretName
.
Tyk Dashboard Admin Last Name
It can be configured via global.adminUser.lastName
as a plain text or Kubernetes secret which includes adminUserLastName
key in it. Then, this secret must be referenced via global.adminUser.useSecretName
.
Tyk Dashboard and Developer Portal Admin Email
It can be configured via global.adminUser.email
as a plain text or Kubernetes secret which includes adminUserEmail
key in it. Then, this secret must be referenced via global.adminUser.useSecretName
.
Tyk Dashboard and Developer Portal Admin Password
It can be configured via global.adminUser.password
as a plain text or Kubernetes secret which includes adminUserPassword
key in it. Then, this secret must be referenced via global.adminUser.useSecretName
.
APISecret
The global.secrets.APISecret
field configures a header value used in every interaction with Tyk Gateway API.
It can be configured via global.secrets.APISecret
as a plain text or Kubernetes secret which includes APISecret
key in it. Then, this secret must be referenced via global.secrets.useSecretName
.
global.secrets.AdminSecret
field sets a secret for Admin API.
It can be configured via global.secrets.AdminSecret
as a plain text or Kubernetes secret which includes AdminSecret
key in it. Then, this secret must be referenced via global.secrets.useSecretName
.
global.secrets.useSecretName
is declared, it takes precedence over global.secrets.APISecret
and global.secrets.AdminSecret
.global.secrets.useSecretName
, where the secret should contain a key called DashLicense
.
Tyk Developer Portal License
In order to refer Tyk Developer Portal license using a Kubernetes secret, please use
tyk-dev-portal.useSecretName
, where the secret should contain a key called DevPortalLicense
.
Tyk Developer Portal Admin Password
In order to refer Tyk Developer Portal’s admin password using a Kubernetes secret,
please use global.adminUser.useSecretName
, where the secret should contain a key called adminUserPassword
.
Tyk Developer Portal Storage Connection String
In order to refer Tyk Developer Portal connection string to the selected database using a Kubernetes secret, please use tyk-dev-portal.useSecretName
, where the secret should contain a key called
DevPortalStorageConnectionString
.
tyk-dev-portal.useSecretName
is in use, please add all keys mentioned to the secret.tyk-dev-portal.useSecretName
, where the secret should contain a key called DevPortalAwsAccessKeyId
.
tyk-dev-portal.useSecretName
is in use, please add all keys mentioned to the secret.tyk-dev-portal.useSecretName
, where the secret should contain a key called
DevPortalAwsSecretAccessKey
.
tyk-dev-portal.useSecretName
is in use, please add all keys mentioned to the secret.global.{mongo,postgres}.connectionURLSecret.name
and global.{mongo,postgres}.connectionURLSecret.keyName
field, as follows:
global.license.operator
as a plain text or Kubernetes secret which includes OperatorLicense
key in it. Then, this secret must be referenced via global.secrets.useSecretName
.
Note: If you are using global.secrets.useSecretName
, you must configure the operator license in the referenced Kubernetes secret. global.license.operator
will not be used in this case.
tyk-gateway
section for updating the Gateway version, enabling TLS, enabling autoscaling etc.
tyk-gateway.gateway.image.tag
. You can find the list of version tags available from Docker hub. Please check Tyk Release notes carefully while upgrading or downgrading.
global.tls.gateway
flag. Setting this value to true will
automatically enable TLS using the certificate provided under tyk-gateway/certs/.
Configure TLS secret
If you want to use your own key/cert pair, please follow the following steps:
global.tls.gateway
to true.tyk-gateway.gateway.tls.useDefaultTykCertificate
to false.tyk-gateway.gateway.tls.secretName
to the name of the newly created secret.--set tyk-gateway.gateway.autoscaling.enabled=true
. By default, it will enable the Horizontal Pod Autoscaler
resource with target average CPU utilization at 60%, scaling between 1 and 3 instances. To customize those values you can modify the tyk-gateway section of the values.yaml
file as shown below:
tyk-gateway.gateway.autoscaling.averageCpuUtilization
for CPU utilization (set by default at 60%) and tyk-gateway.gateway.autoscaling.averageMemoryUtilization
for memory (disabled by default). In addition to that you can define rules for custom metrics using tyk-gateway.gateway.autoscaling.autoscalingTemplate
list:
global.servicePorts.gateway
.
Ingress
An Ingress resource is created if tyk-gateway.gateway.ingress.enabled
is set to true.
tyk-gateway.gateway.control.enabled
to true will allow you to run the Gateway API on a separate port and protect it behind a firewall if needed.
tyk-gateway.gateway.sharding.enabled
, and set tags
to comma separated lists of matching tags.
tyk-stack
chart manages one Gateway deployment in the same namespace as Tyk Dashboard. You can flexibly deploy additional gateways using tyk-gateway
component chart. With gateway sharding, it is useful for:
tyk-gateway
values.yaml
.
another-namespace
.
gateway.opentelemetry.enabled
flag to true. It is disabled by default.
You can also configure connection settings for it’s exporter. By default grpc
exporter is enabled on localhost:4317
endpoint.
To enable TLS settings for the exporter, you can set gateway.opentelemetry.tls.enabled
to true.
gateway.livenessProbe
field. All fields from PodLivenessProbe object can be added here. If set to empty or nil, the default health check on /health will be performed.
Gateway readiness probes can be customised via gateway.readinessProbe
field. All fields from PodReadinessProbe object can be added here. If set to empty or nil, the default health check on /health will be performed.
global.components.pump
to true, and configure below inside tyk-pump
section.
Pump | Configuration |
---|---|
Prometheus Pump (Default) | Add the value prometheus to the tyk-pump.pump.backend entry, and add connection details for Prometheus under tyk-pump.pump.prometheusPump . |
Mongo Pump | Add mongo to tyk-pump.pump.backend , and add connection details for mongo under global.mongo . |
Mongo Selective Pump | Add mongo-selective to tyk-pump.pump.backend , and add connection details for mongo under global.mongo . |
Mongo Aggregate Pump | Add mongo-aggregate to tyk-pump.pump.backend , and add connection details for mongo under global.mongo . |
Postgres Pump | Add postgres to tyk-pump.pump.backend , and add connection details for postgres under global.postgres . |
Postgres Aggregate Pump | Add postgres-aggregate to tyk-pump.pump.backend , and add connection details for postgres under global.postgres . |
Uptime Pump | Set tyk-pump.pump.uptimePumpBackend to mongo or postgres or "" |
Other Pumps | Add the required environment variables in tyk-pump.pump.extraEnvs |
prometheus
to tyk-pump.pump.backend
, and add connection details for Prometheus under tyk-pump.pump.prometheusPump
.
We also support monitoring using Prometheus Operator. All you have to do is set tyk-pump.pump.prometheusPump.prometheusOperator.enabled
to true.
This will create a PodMonitor resource for your Pump instance.
mongo
to tyk-pump.pump.backend
, and add connection details for mongo under global.mongo
. See Mongo Installation section above.
By default, it will enable Mongo Aggregate, Mongo Graph Pump and Mongo Selective Pump.
postgres
to tyk-pump.pump.backend
, and add connection details for postgres under global.postgres
. See PostgresSQL Installation section above.
By default, it will enable Postgres Aggregate, Postgres Graph Aggregate, SQL Pump and SQL graph pump.
pump.uptimePumpBackend
in values.yaml file. It supports the following values
pump.extraEnvs
global.license.dashboard
or through secret global.secrets.useSecretName
. The secret should contain a key called DashLicense.
tyk-dashboard-tls
,
follow these steps to enable TLS:
global.tls.dashboard
to true
.tyk-dashboard.dashboard.tls.secretName
to the name of the Kubernetes secret containing TLS certificates for the Tyk Dashboard, in this case, tyk-dashboard-tls
.tyk-dashboard.dashboard.tls.certificates
, which generates TYK_DB_HTTPSERVEROPTIONS_CERTIFICATES
for the Tyk Dashboard.tyk-dashboard.dashboard.tls.certificatesMountPath
.insecureSkipVerify
via tyk-dashboard.dashboard.tls.certificates
, or mount CA information through tyk-dashboard.dashboard.extraVolumes
and tyk-dashboard.dashboard.extraVolumeMounts
.tyk-bootstrap
chart is used to bootstrap the Tyk Dashboard, ensure that it has certificates to send requests to the Tyk Dashboard or enable insecureSkipVerify
in the tyk-bootstrap
chart.auditLogs
:
auditLogs.enabled
: Enables or disables audit logging. It sets corresponding Dashboard environment variable TYK_DB_AUDIT_ENABLED
. Disabled by default.auditLogs.type
: Specifies the storage type for audit logs (db
or file
). It sets corresponding Dashboard environment variable TYK_DB_AUDIT_STORETYPE
. Set to file
by default.auditLogs.format
: Defines the format of audit log files (json
or text
). It sets corresponding Dashboard environment variable TYK_DB_AUDIT_FORMAT
. Set to text
by default.auditLogs.path
: Sets the path to the audit log file. It sets corresponding Dashboard environment variable TYK_DB_AUDIT_PATH
. Set to "" by default.auditLogs.enableDetailedRecording
: Enables detailed logging, including HTTP requests (headers only) and full HTTP responses. It sets corresponding Dashboard environment variable TYK_DB_AUDIT_DETAILEDRECORDING
. Disabled by default.opa
:
opa.enabled
: Enables OPA support. It sets corresponding Dashboard environment TYK_DB_SECURITY_OPENPOLICY_ENABLED
. Disabled by default.opa.debug
: Activates OPA debug mode for detailed logging of policy execution. It sets corresponding Dashboard environment TYK_DB_SECURITY_OPENPOLICY_DEBUG
. Disabled by default.opa.api
: Enables OPA API mode to manage policies via the Dashboard API. It sets corresponding Dashboard environment TYK_DB_SECURITY_OPENPOLICY_ENABLEAPI
. Disabled by default.opa.allowAdminPasswordReset
: Required if OPA is enabled with its default policies. It sets corresponding Dashboard environment TYK_DB_SECURITY_ALLOWADMINRESETPASSWORD
. Enabled by default.global.components.bootstrap
to true
. It would run tyk-k8s-bootstrap to bootstrap tyk-stack
and to create Kubernetes secrets that can be utilized in Tyk Operator and Tyk Developer Portal.
TYK_AUTH
and TYK_ORG
, it is essential to provide these values through the respective environment variables, called TYK_K8SBOOTSTRAP_TYK_ADMIN_AUTH
for TYK_AUTH
and TYK_K8SBOOTSTRAP_TYK_ORG_ID
for TYK_ORG
.
Ensure that these environment variables are set appropriately to postInstall
hook for bootstrapped environments.
global.components.devPortal
to true, and configure below inside tyk-dev-portal
section.
tyk-dev-portal.license
or through secret global.secrets.useSecretName
. The secret should contain a key called DevPortalLicense
.
sqlite3
to store portal metadata. If you want to use other SQL Database, please modify the section below.
tyk-dev-portal.storage.type
to fs
, and configure tyk-dev-portal.storage.persistence
to mount an existing persistent volume to Tyk Developer Portal.
If you use AWS S3 as storage, please set tyk-dev-portal.storage.type
to s3
, and configure tyk-dev-portal.storage.s3
section with credentials to access AWS S3 bucket.
If you use database as storage, please set tyk-dev-portal.storage.type
to db
, and configure the tyk-dev-portal.database
section with database connection details.
extraEnvs
fields, e.g.:
global.license.operator
field in values.yaml file. You can set license key via a Kubernetes secret using global.secrets.useSecretName
field. The secret should contain a key called OperatorLicense
.
In order to enable installing Tyk Operator along-side Tyk Stack installation, please set global.components.operator
to true
.
All other configurations related to Tyk Operator are available under tyk-operator
section of values.yaml
file.
Tyk Operator needs a cert-manager to be installed. Ensure that cert-manager is installed as described in the official documentation: Installing Tyk Operator.