Last active
September 13, 2023 13:35
-
-
Save proffalken/65610af3004890504c196a651d30a660 to your computer and use it in GitHub Desktop.
Octoprint on k8s
This file contains hidden or 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: | |
creationTimestamp: null | |
labels: | |
io.kompose.service: octoprint-server | |
name: octoprint-server | |
namespace: default | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
io.kompose.service: octoprint-server | |
strategy: | |
type: Recreate | |
template: | |
metadata: | |
creationTimestamp: null | |
labels: | |
io.kompose.network/octoprint-default: "true" | |
io.kompose.service: octoprint-server | |
spec: | |
containers: | |
- image: octoprint/octoprint:latest | |
name: octoprint-server | |
securityContext: | |
privileged: true | |
ports: | |
- containerPort: 5000 | |
hostPort: 5000 | |
protocol: TCP | |
resources: {} | |
volumeMounts: | |
- mountPath: /octoprint | |
name: octoprint-claim | |
- mountPath: /dev/ttyUSB0 | |
name: i3omega | |
env: | |
- name: OCTOPRINT_PORT | |
value: "5000" | |
restartPolicy: Always | |
volumes: | |
- name: octoprint-claim | |
persistentVolumeClaim: | |
claimName: octoprint-claim | |
- name: i3omega | |
hostPath: | |
path: /dev/i3_omega | |
type: CharDev # Needs to be set for the serial port to be used correctly | |
status: {} |
This file contains hidden or 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: | |
creationTimestamp: null | |
labels: | |
io.kompose.service: octoprint-server | |
name: octoprint-server | |
namespace: default | |
spec: | |
ports: | |
- name: "5000" | |
port: 5000 | |
targetPort: 5000 | |
selector: | |
io.kompose.service: octoprint-server | |
status: | |
loadBalancer: {} | |
--- | |
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: octoprint.wallace.network | |
annotations: | |
ingress.kubernetes.io/class: "traefik" | |
ingress.kubernetes.io/ssl-redirect: "false" | |
spec: | |
ingressClassName: traefik | |
rules: | |
- host: octoprint.mydomain.local | |
http: | |
paths: | |
- path: / | |
pathType: Prefix | |
backend: | |
service: | |
name: octoprint-server | |
port: | |
number: 5000 |
This file contains hidden or 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: | |
io.kompose.service: octoprint-claim | |
name: octoprint-claim | |
namespace: default | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
resources: | |
requests: | |
storage: 1Gi | |
status: {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment