k8s部署sentinel-1.8.1
1.参考连接
https://blog.51cto.com/saynaihe/2774368 https://github.com/foxiswho/docker-sentinel
2.拷贝: https://github.com/foxiswho/docker-sentinel 修改Dockerfile,并下载在 https://github.com/alibaba/Sentinel/releases/tag/1.8.1 下载安装包,改名字为sentinel-dashboard.jar
3.开始build镜像
docker build . -t xxxxx/sentinel:1.8.1 docker push xxxxx/sentinel:1.8.1
4.在kubernetes集群中部署sentinel
apiVersion: apps/v1 kind: StatefulSet metadata: name: sentinel namespace: milvus-test labels: app: sentinel spec: serviceName: sentinel replicas: 1 selector: matchLabels: app: sentinel template: metadata: labels: app: sentinel spec: nodeSelector: gpu: prod-gpu imagePullSecrets: - name: ksyunregistrykey containers: - name: sentinel image: xxxxxxx/sentinel:1.8.1 imagePullPolicy: IfNotPresent resources: limits: cpu: 4000m memory: 8G requests: cpu: 400m memory: 1024Mi env: - name: TZ value: Asia/Shanghai - name: JAVA_OPT_EXT value: "-Dserver.servlet.session.timeout=7200" ports: - containerPort: 8280 - containerPort: 8719 volumeMounts: - name: vol-log mountPath: /opt/logs volumes: - name: vol-log hostPath: path: /logs/sentinel/logs-test type: Directory --- apiVersion: v1 kind: Service metadata: labels: app: sentinel name: sentinel namespace: milvus-test spec: type: NodePort ports: - name: "8280" port: 8280 targetPort: 8280 nodePort: 19534 - name: "8719" port: 8719 targetPort: 8719 nodePort: 19535 selector: app: sentinel
5.验证:
用户名密码为 sentinel /sentinel