Skip to content

Instantly share code, notes, and snippets.

@FabianScheidt
Created September 15, 2023 15:03
Show Gist options
  • Save FabianScheidt/dd344566715fa82c7db37060ac1e5bea to your computer and use it in GitHub Desktop.
Save FabianScheidt/dd344566715fa82c7db37060ac1e5bea to your computer and use it in GitHub Desktop.
Kubernetes Deployment of did:web Verification Method Server
apiVersion: apps/v1
kind: Deployment
metadata:
name: 'did-web-verification-method-server'
spec:
selector:
matchLabels:
app.kubernetes.io/component: 'did-web-verification-method-server'
template:
metadata:
labels:
app.kubernetes.io/component: 'did-web-verification-method-server'
spec:
containers:
- name: did-web-verification-method-server
image: fabisch/did-web-verification-method-server:latest
ports:
- name: http
containerPort: 3000
protocol: TCP
livenessProbe:
httpGet:
path: /.well-known/did.json
port: http
initialDelaySeconds: 5
periodSeconds: 5
readinessProbe:
httpGet:
path: /.well-known/did.json
port: http
initialDelaySeconds: 5
periodSeconds: 5
env:
- name: CERTIFICATE
valueFrom:
secretKeyRef:
name: 'did-web-verification-method-server-tls'
key: 'tls.crt'
---
apiVersion: v1
kind: Service
metadata:
name: 'did-web-verification-method-server'
spec:
type: ClusterIP
ports:
- name: http
port: 3000
targetPort: http
selector:
app.kubernetes.io/component: 'did-web-verification-method-server'
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: 'did-web-verification-method-server'
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/use-regex: "true"
spec:
tls:
- hosts:
- example.com
secretName: 'did-web-verification-method-server-tls'
rules:
- host: example.com
http:
paths:
- path: /.well-known/(did\.json|certificate-chain\.pem)
pathType: Exact
backend:
service:
name: 'did-web-verification-method-server'
port:
name: http
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment