-
-
Save adamhancock/a8447dcf479679bfb467ca9d5fbb64ad to your computer and use it in GitHub Desktop.
Node-RED on Kubernetes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: node-red | |
name: node-red | |
namespace: node-red | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: node-red | |
strategy: | |
type: Recreate | |
template: | |
metadata: | |
labels: | |
app: node-red | |
spec: | |
containers: | |
- image: adamhancock/node-red | |
imagePullPolicy: Always | |
name: node-red | |
ports: | |
- containerPort: 1880 | |
protocol: TCP | |
resources: {} | |
env: | |
- name: TZ | |
value: Europe/London | |
- name: PGID | |
value: "1000" | |
- name: PUID | |
value: "1000" | |
volumeMounts: | |
- mountPath: /data | |
name: node-red-claim0 | |
volumes: | |
- name: node-red-claim0 | |
persistentVolumeClaim: | |
claimName: node-red-claim0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: networking.k8s.io/v1beta1 | |
kind: Ingress | |
metadata: | |
annotations: | |
cert-manager.io/cluster-issuer: letsencrypt-prod | |
traefik.ingress.kubernetes.io/redirect-entry-point: https | |
generation: 3 | |
name: node-red | |
namespace: node-red | |
spec: | |
rules: | |
- host: node-red.yourdomain.tld | |
http: | |
paths: | |
- path: / | |
backend: | |
serviceName: node-red | |
servicePort: 1880 | |
tls: | |
- hosts: | |
- node-red.yourdomain.tld | |
secretName: node-red-cert |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
creationTimestamp: null | |
labels: | |
app: node-red | |
name: node-red-claim0 | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
resources: | |
requests: | |
storage: 5Gi | |
status: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
labels: | |
app: node-red | |
name: node-red | |
namespace: node-red | |
spec: | |
ports: | |
- name: "1880" | |
port: 1880 | |
protocol: TCP | |
targetPort: 1880 | |
selector: | |
app: node-red | |
sessionAffinity: None | |
type: ClusterIP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for these deploy files. But please be aware: v1beta1 is outdated. This deployment will not work in >= 1.22
You might use kubectl-convert before deployment, but it seems not to work on k3s, at least for now.