-
Solo 可以部署在 K8S 上面么?
2020-06-18 18:11😂 我 mysql 数据库是当初用 docker 搭的 yaml 里指向的是 docker 的 mysql,估计是 mysql 的问题
-
Solo 可以部署在 K8S 上面么?
2020-06-17 18:41可以 编写两个 yaml 文件
apiVersion: apps/v1 kind: StatefulSet metadata: name: solo namespace: b3log spec: replicas: 1 selector: matchLabels: app: solo serviceName: solo template: metadata: name: solo labels: app: solo spec: tolerations: - key: "node.kubernetes.io/unreachable" operator: "Exists" effect: "NoExecute" tolerationSeconds: 60 - key: "node.kubernetes.io/not-ready" operator: "Exists" effect: "NoExecute" tolerationSeconds: 60 affinity: # 亲和性 nodeAffinity: # Pod亲和性 requiredDuringSchedulingIgnoredDuringExecution: # 硬要求 nodeSelectorTerms: - matchExpressions: - key: node # 根据label是node的键来配对 operator: In # 适用表达式 values: # 值如下 - master # 调度到有master标签的节点 podAntiAffinity: # 如果检测到节点有{app:postgres}则不部署,避免postgres在同一节点重复部署 requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: - key: app operator: In values: - solo topologyKey: "kubernetes.io/hostname" terminationGracePeriodSeconds: 0 # 异常立即删除 containers: - name: solo securityContext: privileged: true image: b3log/solo:latest imagePullPolicy: IfNotPresent ports: - name: solo containerPort: 8080 env: - name: TZ value: Asia/Shanghai - name: RUNTIME_DB value: "MYSQL" - name: JDBC_USERNAME value: "root" - name: JDBC_PASSWORD value: "root" - name: JDBC_DRIVER value: "com.mysql.cj.jdbc.Driver" - name: JDBC_URL value: "jdbc:mysql://192.168.1.222:3306/solo?useUnicode=yes&characterEncoding=UTF-8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true" volumes: - name: tz hostPath: path: /etc/localtime
apiVersion: v1 kind: Service metadata: name: solo namespace: b3log labels: app: solo spec: ports: - port: 8080 targetPort: 8080 name: solo clusterIP: None selector: app: solo --- apiVersion: v1 kind: Service metadata: name: solo-service namespace: b3log labels: app: solo spec: externalIPs: # 暴露Service到外部IP - 192.168.1.228 # IP selector: app: solo ports: - protocol: TCP port: 8080 targetPort: 8080 name: solo
-
关于 vue.js 集成 springsecurity 前后端分离 登录认证过了 postman 正常
2020-04-20 17:46返回 200 说明 security 认证通过了,数据显示未登录要看你的逻辑怎么写的
-
gowork 的基本介绍(一)
2020-04-03 17:21谢谢大佬,我在本机 windows 下使用 IDE 的确会自动下载依赖,但是将 gowork 下载至 linux go build 就无法下载