k8s如何部署seata(分布式事务)?
官方传送门https://seata.io/zh-cn/
快速入门SEATA
Seata 是一款开源的分布式事务解决方案,致力于提供高性能和简单易用的分布式事务服务。Seata 将为用户提供了 AT、TCC、SAGA 和 XA 事务模式,为用户打造一站式的分布式解决方案。
本文章只提供部署教程,**
话不多,但图很多。
**
kuboard 部署 SEATA
第一步:创建工作负载
第二步:基本信息
第三步:容器信息
第四步:高级设置
第五步:服务/应用路由
yaml配置
---
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
k8s.kuboard.cn/displayName: ''
labels:
k8s.kuboard.cn/layer: cloud
k8s.kuboard.cn/name: yc-seata-server
name: yc-seata-server
namespace: sca-dev
resourceVersion: '1868503'
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
k8s.kuboard.cn/layer: cloud
k8s.kuboard.cn/name: yc-seata-server
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
creationTimestamp: null
labels:
k8s.kuboard.cn/layer: cloud
k8s.kuboard.cn/name: yc-seata-server
spec:
containers:
- image: 'bldharbor.wsb003.cn/sca/yc-seata-server:2.0.0'
imagePullPolicy: Always
name: yc-seata-server
ports:
- containerPort: 30095
protocol: TCP
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
imagePullSecrets:
- name: harbor
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
---
apiVersion: v1
kind: Service
metadata:
annotations: {}
labels:
k8s.kuboard.cn/layer: cloud
k8s.kuboard.cn/name: yc-seata-server
name: yc-seata-server
namespace: sca-dev
resourceVersion: '1868492'
spec:
clusterIP: 10.233.107.82
clusterIPs:
- 10.233.107.82
externalTrafficPolicy: Cluster
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
ports:
- name: rbkf6x
nodePort: 30095
port: 30095
protocol: TCP
targetPort: 30095
selector:
k8s.kuboard.cn/layer: cloud
k8s.kuboard.cn/name: yc-seata-server
sessionAffinity: ClientIP
sessionAffinityConfig:
clientIP:
timeoutSeconds: 10800
type: NodePort