Deploy Tyk
This example uses Tyk
, an API gateway and management platform.
Tyk is used together with Redis to store API tokens and OAuth clients.
To run this example, follow these steps:
-
Install the
kraft
CLI tool and a container runtime engine, e.g. Docker. -
Clone the
examples
repository andcd
into theexamples/tyk/
directory:
Make sure to log into KraftCloud by setting your token and a metro close to you.
We use fra0
(Frankfurt, π©πͺ) in this guide:
When done, invoke the following command to deploy this application on KraftCloud:
The output shows the Compose output:
To list information about the instances, use:
The Tyk and Redis instances are named tyk-tyk
and tyk-redis
(as defined in the compose.yaml
file).
Only the Tyk instance is available as a public service.
Its URL is https://funky-pond-45usfkxx.fra0-test.kraft.host
.
It is different for each run.
Use curl
to query the Tyk instance on KraftCloud on the available URL:
When done, you can bring down the instances:
Customize your Application
To customize the Tyk application, you can update:
Kraftfile
: the KraftCloud specificationDockerfile
/rootfs/
: the Tyk filesystem (in this case the configuration file/etc/tyk.conf
)compose.yaml
: the Compose specification
Itβs unlikely you will have to update the Kraftfile
specification.
Update the contents of the rootfs/etc/tyk.conf
file for a different configuration.
You can also update the Dockerfile
in order to extend the Tyk filesystem with additional data files or configuration files.
The compose.yaml
file can be update to assign different names, ports, network names or other Compose-specific configurations.
Learn More
Use the --help
option for detailed information on using KraftCloud:
Or visit the CLI Reference.