K8S环境部署jaeger-all-in-one

目录

一、Jaeger training简介

二、创建pod:

三、创建service

四、外部访问


一、Jaeger tracing简介

Jaeger是CNCF力推的OpenTelemetry的监控部分。官网:https://www.jaegertracing.io/

二、创建pod:

K8S 创建jaeger-all-in-one 所需yaml文件:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: jaegertracing-all-in-one
  namespace: monitoring
spec:
  replicas: 1
  selector:
    matchLabels:
      app: jaegertracing-all-in-one
  template:
    metadata:
      labels:
        app: jaegertracing-all-in-one
    spec:
      containers:
      - name: jaeger-all-in-one
        image: companyname.com.cn:30100/fromupstream/jaegertracing-all-in-one:1.20.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: 9411
          protocol: TCP

验证:

看pod:

kubectl get pod -n monitoring -owide | grep jaeger
jaegertracing-all-in-one-68dd5db976-dqbx5   1/1     Running   0          4d20h   100.91.194.189    host-172-18-195-245   <none>           <none>

访问:http://100.91.194.189:16686/ 有结果,表示pod没问题了。

三、创建service

service所需yaml文件

apiVersion: v1
kind: Service
metadata:
  name: jaeger-service
  namespace: monitoring
  labels:
    app: jaegertracing-all-in-one
spec:
  type: NodePort
  selector:
    app: jaegertracing-all-in-one
  ports:
  - port: 16686
    targetPort: 16686
    nodePort: 32686
    name: jaegerservice

验证:

看service:

kubectl get service -n monitoring | grep jaeger
jaeger-service          NodePort    10.107.96.130    <none>        16686:32686/TCP              4d2h

访问:10.107.96.130:16686 有结果,表示service没问题了。

四、外部访问

浏览器输入:http://hostip:32686,出现如下图所示,没问题了。

参考文档: https://www.jaegertracing.io/docs/1.19/getting-started/#all-in-one

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值