PlantUML


PlantUMLPlantUML is an on-line diagraming tool that uses UML to store your diagrams as code (for easier version control in a GIT repository). I use it for internal documentation purposes. Below is how I've implemented PlantUML into my Kubernetes cluster.

Product: PlantUML
Install Type: Manual YAML Files
Container Image: PlantUML

Installation Details

I have not as of yet created a Helm chart for this, so I have configured traditional manifests for this deployment.

The following assume you have an existing namespace named utility, an nginx inress named nginx, and Cert Manager configured to use the ACME provider Letsencrypt. Please adjust for your particular needs.

00-utility-namespace.yaml

apiVersion: v1
kind: Namespace
metadata:
  name: utility
  labels:
    name: utility

This is optional, but I create the namespace in my builds in case I have to recover from scratch. If it already exists, it will not have any real negative effects

01-plantuml-deploy.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: plantuml
  namespace: utility
  labels:
    app: plantuml
    app.kubernetes.io/name: plantuml
spec:
  replicas: 1
  selector:
    matchLabels:
      app: plantuml
  template:
    metadata:
      labels:
        app: plantuml
        app.kubernetes.io/name: plantuml
    spec:
      containers:
        - name: plantuml
          image: plantuml/plantuml-server:jetty
          imagePullPolicy: Always

02-plantuml-service.yaml

kind: Service
apiVersion: v1
metadata:
  name: plantuml-service
  namespace: utility
spec:
  selector:
    app: plantuml
  ports:
  - protocol: TCP
    port: 8080
    targetPort: 8080
  type: ClusterIP

03-plantuml-ingress.yaml

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: plantuml
  namespace: utility
  annotations:
    cert-manager.io/cluster-issuer: 'letsencrypt'
spec:
  rules:
    - host: your.host.name
      http:
        paths:
        - path: /
          pathType: Prefix
          backend:
            service:
              name: plantuml-service
              port:
                number: 8080
  tls:
    - hosts:
      - your.host.name
      secretName: plantuml-tls

As mentioned above, the ingress configuration assumes working ingress and cert-manager configurations

Now, we can deploy this all together with:

kubectl apply -f 00-utility-namespace.yaml \
              -f 01-plantuml-deploy.yaml \
              -f 02-plantuml-service.yaml \
              -f 03-plantuml-ingress.yaml