Last update: Dec 11, 2021
Deploying KrakenD in Kubernetes requires a straightforward configuration.
Dockerfile that includes the configuration of the service. Read how to generate a Docker artifact for detailed instructions. You could also use a ConfigMap, although the recommendation is to use immutable artifacts.
From here you need to create a
NodePort and send all the traffic to KrakenD.
deployment definition, in a file called
apiVersion: apps/v1 kind: Deployment metadata: name: krakend-deployment spec: selector: matchLabels: app: krakend replicas: 2 template: metadata: labels: app: krakend spec: containers: - name: krakend image: YOUR-KRAKEND-IMAGE:1.0.0 ports: - containerPort: 8080 imagePullPolicy: Never command: [ "/usr/bin/krakend" ] args: [ "run", "-d", "-c", "/etc/krakend/krakend.json", "-p", "8080" ] env: - name: KRAKEND_PORT value: "8080"
service definition, in a file called
apiVersion: v1 kind: Service metadata: name: krakend-service spec: type: NodePort ports: - name: http port: 8000 targetPort: 8080 protocol: TCP selector: app: krakend
$kubectl create -f deployment-definition.yaml
$kubectl create -f service-definition.yaml
For a more step by step process see this blog entry.
There is no official Helm chart for KrakenD. But you can see as example Mikescandy’s contribution
The documentation is only a piece of the help you can get! Whether you are looking for Open Source or Enterprise support, see more support channels that can help you.