1
0
mirror of https://github.com/octoleo/plantuml-server.git synced 2024-11-16 01:07:10 +00:00
plantuml-server/examples/kubernetes-simple
2022-07-21 15:22:50 +02:00
..
deployment.yaml Add simple Kubernetes example 2022-07-21 15:22:50 +02:00
README.md Add simple Kubernetes example 2022-07-21 15:22:50 +02:00

PlantUML Kubernetes Deployment

In this example, PlantUML is deployed on an Kubernetes cluster using a Deployment, a Service and an Ingress.

Quick start

Install:

# Hint: Adjust the Ingress host to your URL

kubectl create ns plantuml
kubectl -n plantuml apply -f deployment.yaml

Uninstall:

kubectl -n plantuml delete -f deployment.yaml
kubectl delete ns plantuml

TLS configuration

Create a TLS Secret and extend the Ingress spec with a TLS configuration:

[...]
  tls:
  - hosts:
    - plantuml-example.localhost
    secretName: plantuml-tls

Since the Ingress Controller terminates the TLS and routes http to the application, we might need to tell the application explicitly that it got a forwarded request.

This configuration changes depending on the Ingress Controller. Here an nginx example:

annotations:
  kubernetes.io/ingress.class: nginx
  nginx.ingress.kubernetes.io/configuration-snippet: |
    more_set_headers "X-Forwarded-Proto: https";

Useful commands

# see whats going on inside your Deployment
kubectl -n plantuml logs -l "app.kubernetes.io/name=plantuml"