Example Tyk OAS API
Last updated: 2 minutes read.
In addition to following a step-by-step approach using the Tyk Operator, you can also use Kubernetes manifest files to define your API configurations and apply them directly with kubectl
. This method allows for easy version control, repeatability, and integration with CI/CD pipelines.
This example shows the minimum resources and fields required to define a Tyk OAS API using Tyk Operator.
|
|
Here, a ConfigMap
is created that contains the Tyk OAS API Definition with the data
field with key test_oas.json
. This is linked to from a TykOasApiDefinition
resource via spec.tykOAS.configmapRef
.
To apply it, simply save the manifest into a file (e.g., tyk-oas-api.yaml
) and use kubectl apply -f tyk-oas-api.yaml
to create the required resources in your Kubernetes cluster. This command will create the necessary ConfigMap and TykOasApiDefinition resources in the default
namespace.