- zipkin是微服务架构多个服务之间rpc调用之间的调用上下级关系记录;
- zipkin,默认不会持久化数据,默认保存到内存
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: sleuth-zipkin
name: ssx-sleuth-zipkin-dm
namespace: ssx
spec:
replicas: 1
selector:
matchLabels:
app: sleuth-zipkin
template:
metadata:
labels:
app: sleuth-zipkin
spec:
hostAliases:
- ip: "192.168.0.101"
hostnames:
- "node101"
- ip: "192.168.0.102"
hostnames:
- "node102"
- ip: "192.168.0.103"
hostnames:
- "node103"
containers:
- name: ssx-sleuth-zipkin-c
image: openzipkin/zipkin:2
ports:
- containerPort: 9411
volumeMounts:
- mountPath: /etc/localtime
name: c-v-path-lt
volumes:
- name: c-v-path-lt
hostPath:
path: /etc/localtime
nodeSelector:
kubernetes.io/hostname: node101
---
apiVersion: v1
kind: Service
metadata:
labels:
app: sleuth-zipkin
name: ssx-sleuth-zipkin-sv
namespace: ssx
spec:
ports:
- port: 9000
name: ssx-sleuth-zipkin-last9000
protocol: TCP
targetPort: 9411
nodePort: 30800
selector:
app: sleuth-zipkin
type: NodePort