在Kubernetes中部署监督者和工作节点到不同的pods。
以下是yaml文件:
Supervisor:apiVersion: apps/v1 kind: Deployment metadata: name: xinference-supervisor-deployment namespace: default spec: replicas: 1 selector: matchLabels: app: xinference-supervisor template: metadata: labels: app: xinference-supervisor spec: containers: - name: xinference image: */ai-demo/xinference:4.2 ports: - containerPort: 9997 command: ["/bin/sh","-c"] args: ["xinference-supervisor -H $MY_POD_IP"] env: - name: MY_POD_IP valueFrom: fieldRef: fieldPath: status.podIP resources: limits: nvidia.com/gpu: "1"
Worker:apiVersion: apps/v1 kind: Deployment metadata: name: xinference-worker-deployment namespace: default spec: replicas: 2 selector: matchLabels: app: xinference-worker template: metadata: labels: app: xinference-worker spec: containers: - name: xinference image: */ai-demo/xinference:4.2 command: ["/bin/sh","-c"] args: ["xinference-worker -e http://xinference-supervisor-service:9997"] resources: limits: nvidia.com/gpu: "1"
Service:
`apiVersion: v1
kind: Service
metadata:
name: xinference-supervisor-service
namespace: default
spec:
selector:
app: xinference-supervisor
ports:
- protocol: TCP
name: http
port: 9997
targetPort: 9997
nodePort: 30000
type: NodePort`
1条答案
按热度按时间cgvd09ve1#
感谢您的反馈,看起来监督者的端口没有暴露。我们将在下一个版本中修复这个问题。