--- # 创建 Namespace apiVersion: v1 kind: Namespace metadata: name: hty1024-app --- # 创建 Service apiVersion: v1 kind: Service metadata: name: hty1024-app-lobe-chat-service namespace: hty1024-app labels: app.k8s.hty1024.com/env: prod app.k8s.hty1024.com/type: app app.k8s.hty1024.com/name: lobe-chat app.k8s.hty1024.com/version: v1.46.1 app.k8s.hty1024.com/resources: service spec: type: ClusterIP # type: NodePort ports: - port: 3210 targetPort: 3210 # nodePort: 32000 selector: app.k8s.hty1024.com/env: prod app.k8s.hty1024.com/type: app app.k8s.hty1024.com/name: lobe-chat app.k8s.hty1024.com/version: v1.46.1 app.k8s.hty1024.com/resources: pod --- # 创建 Deployment apiVersion: apps/v1 kind: Deployment metadata: name: hty1024-app-lobe-chat-deployment namespace: hty1024-app labels: app.k8s.hty1024.com/env: prod app.k8s.hty1024.com/type: app app.k8s.hty1024.com/name: lobe-chat app.k8s.hty1024.com/version: v1.46.1 app.k8s.hty1024.com/resources: deployment spec: replicas: 1 minReadySeconds: 30 selector: matchLabels: app.k8s.hty1024.com/env: prod app.k8s.hty1024.com/type: app app.k8s.hty1024.com/name: lobe-chat app.k8s.hty1024.com/version: v1.46.1 app.k8s.hty1024.com/resources: pod template: metadata: labels: app.k8s.hty1024.com/env: prod app.k8s.hty1024.com/type: app app.k8s.hty1024.com/name: lobe-chat app.k8s.hty1024.com/version: v1.46.1 app.k8s.hty1024.com/resources: pod spec: terminationGracePeriodSeconds: 60 volumes: - name: localtime hostPath: path: /etc/localtime - name: shanghai hostPath: path: /usr/share/zoneinfo/Asia/Shanghai containers: - name: lobe-chat image: lobehub/lobe-chat:v1.46.1 ports: - name: tcp containerPort: 3210 volumeMounts: - name: shanghai mountPath: /etc/localtime readOnly: true env: - name: ACCESS_CODE value: "123456" - name: ENABLED_OPENAI value: "1" - name: OPENAI_API_KEY value: "123456" - name: ENABLED_GOOGLE value: "1" - name: GOOGLE_API_KEY value: "123456" - name: ENABLED_AWS_BEDROCK value: "0" - name: AWS_ACCESS_KEY_ID value: "123456" - name: AWS_SECRET_ACCESS_KEY value: "123456" - name: OPENROUTER_API_KEY value: "123456" - name: FEATURE_FLAGS value: "-webrtc_sync,+language_model_settings,-openai_api_key,-openai_proxy_url,+create_session,+edit_agent,+dalle,-check_updates,+welcome_suggest,+market,+speech_to_text,-knowledge_base,-clerk_sign_up" startupProbe: tcpSocket: port: 3210 initialDelaySeconds: 0 periodSeconds: 10 timeoutSeconds: 1 failureThreshold: 30 readinessProbe: tcpSocket: port: 3210 initialDelaySeconds: 5 periodSeconds: 5 timeoutSeconds: 1 successThreshold: 1 livenessProbe: tcpSocket: port: 3210 initialDelaySeconds: 10 periodSeconds: 5 timeoutSeconds: 1 failureThreshold: 3 nodeSelector: node.k8s.hty1024.com/type: app