# FlaskPaste Kubernetes Deployment # Generated from Podman container configuration # # Apply: kubectl apply -f kubernetes.yaml # Delete: kubectl delete -f kubernetes.yaml --- apiVersion: v1 kind: Namespace metadata: name: flaskpaste --- apiVersion: v1 kind: ConfigMap metadata: name: flaskpaste-config namespace: flaskpaste data: FLASK_ENV: "production" FLASKPASTE_URL_PREFIX: "" FLASKPASTE_EXPIRY_ANON: "432000" FLASKPASTE_MAX_ANON: "3145728" FLASKPASTE_MAX_AUTH: "52428800" --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: flaskpaste-data namespace: flaskpaste spec: storageClassName: local-path accessModes: - ReadWriteOnce resources: requests: storage: 1Gi --- apiVersion: apps/v1 kind: Deployment metadata: name: flaskpaste namespace: flaskpaste labels: app: flaskpaste spec: replicas: 1 selector: matchLabels: app: flaskpaste template: metadata: labels: app: flaskpaste spec: securityContext: runAsUser: 65532 runAsGroup: 65532 fsGroup: 65532 imagePullSecrets: - name: harbor-creds containers: - name: flaskpaste image: harbor.mymx.me/library/flaskpaste:slim ports: - containerPort: 5000 protocol: TCP envFrom: - configMapRef: name: flaskpaste-config volumeMounts: - name: data mountPath: /app/data resources: limits: memory: "256Mi" cpu: "1000m" requests: memory: "64Mi" cpu: "250m" livenessProbe: httpGet: path: /health port: 5000 initialDelaySeconds: 10 periodSeconds: 30 timeoutSeconds: 5 readinessProbe: httpGet: path: /health port: 5000 initialDelaySeconds: 5 periodSeconds: 10 timeoutSeconds: 3 volumes: - name: data persistentVolumeClaim: claimName: flaskpaste-data --- apiVersion: v1 kind: Service metadata: name: flaskpaste namespace: flaskpaste spec: selector: app: flaskpaste ports: - protocol: TCP port: 80 targetPort: 5000 nodePort: 30500 type: NodePort --- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: flaskpaste namespace: flaskpaste annotations: traefik.ingress.kubernetes.io/router.middlewares: "" spec: rules: - host: paste.mymx.me http: paths: - path: / pathType: Prefix backend: service: name: flaskpaste port: number: 80