starchat-ui / k8s /chatbot-ui.yaml
matthoffner's picture
Duplicate from matthoffner/chatbot
13095e0
apiVersion: v1
kind: Namespace
metadata:
name: chatbot-ui
---
apiVersion: v1
kind: Secret
metadata:
namespace: chatbot-ui
name: chatbot-ui
type: Opaque
data:
OPENAI_API_KEY: <base64 encoded key>
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: chatbot-ui
name: chatbot-ui
labels:
app: chatbot-ui
spec:
replicas: 1
selector:
matchLabels:
app: chatbot-ui
template:
metadata:
labels:
app: chatbot-ui
spec:
containers:
- name: chatbot-ui
image: <docker user>/chatbot-ui:latest
resources: {}
ports:
- containerPort: 3000
env:
- name: OPENAI_API_KEY
valueFrom:
secretKeyRef:
name: chatbot-ui
key: OPENAI_API_KEY
---
kind: Service
apiVersion: v1
metadata:
namespace: chatbot-ui
name: chatbot-ui
labels:
app: chatbot-ui
spec:
ports:
- name: http
protocol: TCP
port: 80
targetPort: 3000
selector:
app: chatbot-ui
type: ClusterIP