tyk-control-plane
provides the default deployment of Tyk control plane 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 MDCB | 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 could find the list of version tags available from Docker hub.
tyk
with the release name tyk-cp
, issue the following commands:
values.yaml
for the following settings:
tyk-mdcb.mdcb.service.type
to NodePort or LoadBalancer.
Then just run:
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.
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
section of values 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 pass
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
.
MDCB License
In order to refer to a Tyk MDCB license through a Kubernetes secret, please use tyk-mdcb.mdcb.useSecretName
, where the secret should contain a key called MDCBLicense
.
MDCB Secret
In order to set the secret for accessing MDCB secure HTTP endpoints through a Kubernetes secret, please use tyk-mdcb.mdcb.useSecretName
, where the secret should contain a key called securitySecret
.
Tyk Developer Portal License
In order to refer to a Tyk Developer Portal license through 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 to a Tyk Developer Portal’s admin password through 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 to a Tyk Developer Portal connection string to the selected database through 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.redis.passSecret.name
and global.redis.passSecret.keyName
field, as follows:
yourSecret
and you have the mongo connection URL stored in key mongoConnectionURLkey
. Store the connection string in Kubernetes secret and refer to this secret via global.mongo.connectionURLSecret.name
and global.mongo.connectionURLSecret.keyName
field, as follows:
yourSecret
and you have the postgres connection string stored in key postgreConnectionURLkey
. Store the connection string in Kubernetes secret and refer to this secret via global.postgres.connectionStringSecret.name
and global.postgres.connectionStringSecret.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.
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 perform 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 values.yaml
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.components.pump
to true and configure the following parameters included below inside the 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 bootstrap app can validate certificate of 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.tyk-mdcb.mdcb.license
. This field is mandatory and must be configured.
To enhance security and avoid storing plaintext values for the MDCB license directly in the Helm value file, an alternative approach is available. You can store the license in a Kubernetes Secret and reference it externally.
Set the license in the Kubernetes Secret and provide the secret’s name through tyk-mdcb.mdcb.useSecretName
. The Secret must contain a key named MDCBLicense
.
tyk-mdcb.mdcb.listenPort
field represents a RPC port which worker Tyk Gateways will connect to.
Setting tyk-mdcb.mdcb.listenPort
field opens a port on MDCB container and MDCB service targets this port.
It is used to set TYK_MDCB_LISTENPORT
tyk-mdcb.mdcb.httpPort
field.
This port enables MDCB to accept standard HTTP requests, such as health checks.
It also defines the path for liveness and readiness probes.
It is used to set TYK_MDCB_HTTPPORT
in MDCB 2.6.0+ or TYK_MDCB_HEALTHCHECKPORT
in MDCB 2.5.x or prior.
/dataplanes
which return list of gateway nodes connected. By default, this endpoint is disabled to avoid unintended leakage of data plane information. To enable this endpoint, set tyk-mdcb.mdcb.security.enableHttpSecureEndpoints
to true
. It is used to set TYK_MDCB_SECURITY_ENABLEHTTPSECUREENDPOINTS
. Also, you need to set a secret that can be used to access this endpoint via tyk-mdcb.mdcb.security.secret
field.
mdcb-tls-secret
, follow these steps to enable TLS for RPC connection:
tyk-mdcb.mdcb.tls.useSSL
to true.tyk-mdcb.mdcb.tls.secretName
to the name of the Kubernetes secret containing TLS certificates for the Tyk MDCB, in this case, mdcb-tls-secret
.tyk-mdcb.mdcb.httpServerOptions
. The configuration includes settings such as useSSL
, certificateKeyFile
, certificateCertFile
and minVersion
. For other HTTP server options, users can utilize extraEnvs to configure additional parameters.
global.components.bootstrap
to true
. It would run tyk-k8s-bootstrap to bootstrap tyk-control-plane
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 a different 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 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 Control Plane 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.