Skip to main content

Common App Deployments

Below is a small selection of yamls for deployment of common apps, assuming the same/similar configuration to what was setup in this series.

danger

These configs are provided 'as-is', please pay attention to the comments in the files for what areas you need to configure for your uses.

Cloudflare DDNS

## Namespace
apiVersion: v1
kind: Namespace
metadata:
name: cloudflare-ddns
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: cloudflare-ddns
name: cloudflare-ddns
namespace: cloudflare-ddns
spec:
replicas: 1
selector:
matchLabels:
app: cloudflare-ddns
template:
metadata:
labels:
app: cloudflare-ddns
spec:
containers:
- image: hotio/cloudflareddns
imagePullPolicy: Always
name: cloudflare-ddns
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 500m
memory: 128Mi
env:
- name: INTERVAL
value: "300"
- name: DETECTION_MODE
value: "d-g-whoami.cloudflare"
- name: LOG_LEVEL
value: "1"
- name: CF_APITOKEN
value: "XYZABC" ## Add your Cloudflare Token
- name: CF_HOSTS
value: "subdomain1.domain.com;subdomain2.domain.com" ## Add your sub-domains
- name: CF_ZONES
value: "domain.com" ## Add your root domain
- name: CF_RECORDTYPES
value: "A"
volumeMounts:
- mountPath: /config
name: cloudflare-ddns-appdata
restartPolicy: Always
terminationGracePeriodSeconds: 30
volumes:
- name: cloudflare-ddns-appdata
persistentVolumeClaim:
claimName: cloudflare-ddns-appdata
---
# STORAGE
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: cloudflare-ddns-appdata
namespace: cloudflare-ddns
labels:
app: cloudflare-ddns
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi

MicroBin

apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: microbin
name: microbin
namespace: microbin
spec:
replicas: 1
selector:
matchLabels:
app: microbin
template:
metadata:
labels:
app: microbin
spec:
containers:
- image: danielszabo99/microbin
imagePullPolicy: Always
name: microbin
ports:
- containerPort: 8080
protocol: TCP
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 500m
memory: 128Mi
volumeMounts:
- mountPath: /app/pasta_data
name: microbin-appdata
args: ## Add/edit any additional arguments for app configuration below.
- --editable
- --hide-footer
- --highlightsyntax
- --private
restartPolicy: Always
terminationGracePeriodSeconds: 30
volumes:
- name: microbin-appdata
persistentVolumeClaim:
claimName: microbin-appdata
---
# STORAGE
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: microbin-appdata
namespace: microbin
labels:
app: microbin
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
---
# SERVICE
kind: Service
apiVersion: v1
metadata:
name: microbin-service
namespace: microbin
spec:
type: ClusterIP
selector:
app: microbin
ports:
- name: http
port: 80 # Port for ingress to use
protocol: TCP
targetPort: 8080 # Port of app
---
#INGRESS
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: microbin-ingress
namespace: external-apps
annotations:
kubernetes.io/ingress.class: traefik
spec:
rules:
- host: "microbin.domain.com"
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: microbin-service
port:
number: 80 # Port for ingress to use

Cloudflare Tunnel

Assumes you have your tunnel token from the cloudflare wizard -

## Namespace
apiVersion: v1
kind: Namespace
metadata:
name: cloudflare-tunnel
---
## App
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: cloudflare-tunnel
pod: cloudflare-tunnel
name: cloudflare-tunnel
namespace: cloudflare-tunnel
spec:
replicas: 1
selector:
matchLabels:
app: cloudflare-tunnel
pod: cloudflare-tunnel
template:
metadata:
labels:
app: cloudflare-tunnel
pod: cloudflare-tunnel
spec:
containers:
- image: cloudflare/cloudflared
imagePullPolicy: Always
name: cloudflare-tunnel
command:
- cloudflared
- tunnel
- run
args:
- --token
- 123ABC ## Add your Cloudflare Token
restartPolicy: Always
terminationGracePeriodSeconds: 30

ChangeDetection.io

## Namespace
apiVersion: v1
kind: Namespace
metadata:
name: changedetection-io
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: changedetection-io
name: changedetection-io
namespace: changedetection-io
spec:
replicas: 1
selector:
matchLabels:
app: changedetection-io
template:
metadata:
labels:
app: changedetection-io
spec:
containers:
- image: lscr.io/linuxserver/changedetection.io
imagePullPolicy: Always
name: changedetection-io
ports:
- containerPort: 5000
protocol: TCP
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 500m
memory: 128Mi
volumeMounts:
- mountPath: /config
name: changedetection-io-appdata
restartPolicy: Always
terminationGracePeriodSeconds: 30
volumes:
- name: changedetection-io-appdata
persistentVolumeClaim:
claimName: changedetection-io-appdata
---
# STORAGE
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: changedetection-io-appdata
namespace: changedetection-io
labels:
app: changedetection-io
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
---
# SERVICE
kind: Service
apiVersion: v1
metadata:
name: changedetection-io-service
namespace: changedetection-io
spec:
type: ClusterIP
selector:
app: changedetection-io
ports:
- name: http
port: 80 # Port for ingress to use
protocol: TCP
targetPort: 5000 # Port of app
---
#INGRESS
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: changedetection-io-ingress
namespace: changedetection-io
annotations:
kubernetes.io/ingress.class: traefik
spec:
rules:
- host: "changedetection.domain.com"
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: changedetection-io-service
port:
number: 80 # Port for ingress to use

Next Step

Next, go to the next step, Dashboard - K8s.
Or,
Go back to the index page.