pod的yaml如下:这里使用的是主机host模式
apiVersion: apps/v1
kind: Deployment
metadata:
name: jaeger
labels:
app: jaeger
spec:
replicas: 1
selector:
matchLabels:
app: jaeger
template:
metadata:
labels:
app: jaeger
spec:
hostNetwork: true
containers:
- name: jaeger
image: docker.io/rancher/mirrored-jaegertracing-all-in-one:1.56.0
ports:
- containerPort: 5775
protocol: UDP
- containerPort: 6831
protocol: UDP
- containerPort: 6832
protocol: UDP
- containerPort: 5778
protocol: TCP
- containerPort: 16686
protocol: TCP
- containerPort: 14268
protocol: TCP
- containerPort: 14250
protocol: TCP
- containerPort: 9411
protocol: TCP
env:
- name: COLLECTOR_ZIPKIN_HOST_PORT
value: ":9411"
可以通过:
kubectl get pod -o wide
看到pod的ip就是节点的ip。
在主机浏览器通过:
http://192.168.153.32:16686 访问