在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):jaegertracing/jaeger-kubernetes开源软件地址(OpenSource Url):https://github.com/jaegertracing/jaeger-kubernetes开源编程语言(OpenSource Language):Java 80.6%开源软件介绍(OpenSource Introduction):Jaeger Kubernetes TemplatesThis repository is deprecated!The recommended way of installing and managing Jaeger in a production Kubernetes cluster is via the Jaeger Operator. The Jaeger Operator provides a CLI to generate Kubernetes manifests from the Jaeger CR. This can be considered as an alternative source of plain Kubernetes manifest files. Jaeger ecosystem also provides a Helm chart as an alternative way of deploying Jaeger. How to contributePlease see CONTRIBUTING.md Development setupThis template uses an in-memory storage with a limited functionality for local testing and development. The image used defaults to the latest version released. Do not use this template in production environments. Note that functionality may differ from the pinned docker versions for production. Install everything in the current namespace: kubectl create -f https://raw.githubusercontent.com/jaegertracing/jaeger-kubernetes/master/all-in-one/jaeger-all-in-one-template.yml Once everything is ready, Production setupPinned Production VersionThe docker image tags are manually pinned and manually updated. You should use the current pinned version for production. Backing storageThe Jaeger Collector and Query require a backing storage to exist before being started up. As a starting point for your own templates, we provide basic templates deploying Cassandra and Elasticsearch. None of them are ready for production and should be adapted before any real usage. To use our Cassandra template:
For Elasticsearch, use:
The Cassandra template includes also a Kubernetes
The job should have Jaeger configurationThe Jaeger Collector, Query and Agent require a If changes are required for the configuration, the
Jaeger componentsThe main production template deploys the Collector and the Query Service (with UI) as separate individually scalable services,
as well as the Agent as
If the backing storage is not ready by the time the Collector/Agent start, they will fail and Kubernetes will reschedule the pod. It's advisable to either wait for the backing storage to stabilize, or to ignore such failures for the first few minutes. Once everything is ready, As the agent is deployed as a env:
- name: JAEGER_AGENT_HOST
valueFrom:
fieldRef:
fieldPath: status.hostIP Deploying the agent as sidecarThe Jaeger Agent is designed to be deployed local to your service, so that it can receive traces via UDP keeping your
application's load minimal. By default, the template above installs the agent as a Assuming that your application is named - apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp
spec:
selector:
matchLabels:
app.kubernetes.io/name: myapp
template:
metadata:
labels:
app.kubernetes.io/name: myapp
spec:
containers:
- image: mynamespace/hello-myimage
name: myapp
ports:
- containerPort: 8080
- image: jaegertracing/jaeger-agent
name: jaeger-agent
ports:
- containerPort: 5775
protocol: UDP
- containerPort: 6831
protocol: UDP
- containerPort: 6832
protocol: UDP
- containerPort: 5778
protocol: TCP
args: ["--collector.host-port=jaeger-collector.jaeger-infra.svc:14267"] The Jaeger Agent will then be available to your application at Configure UDP/HTTP SendersAs the Jaeger Agent is deployed with the other components, your application needs to tell the Jaeger Client where to find the agent. Refer to your client's documentation for the appropriate mechanism, but most clients allow this to be set via the environment variable env:
- name: JAEGER_SERVICE_NAME
value: <YOUR SERVICE NAME>
- name: JAEGER_AGENT_HOST
value: jaeger-agent
- name: JAEGER_SAMPLER_TYPE
value: const
- name: JAEGER_SAMPLER_PARAM
value: "1" The following service names are supported by HTTP sender:
The following service names are supported by UDP sender:
Persistent storageEven though this template uses a stateful Cassandra, backing storage is set to Service DependenciesJaeger production deployment needs an external process to derive dependency links between services. Project spark-dependencies provides this functionality. This job should be periodically run before end of a day. The following command creates For Cassandra, use: kubectl run jaeger-spark-dependencies --schedule="55 23 * * *" --env="STORAGE=cassandra" --env="CASSANDRA_CONTACT_POINTS=cassandra:9042" --restart=Never --image=jaegertracing/spark-dependencies For Elasticsearch, use: kubectl run jaeger-spark-dependencies --schedule="55 23 * * *" --env="STORAGE=elasticsearch" --env="ES_NODES=elasticsearch:9200" --env="ES_USERNAME=changeme" --env="ES_PASSWORD=changeme" --restart=Never --image=jaegertracing/spark-dependencies If you want to run the job only once and immediately then remove scheduled flag. Deploying Docker TagsThe Jaeger project automatically creates new Docker images with tags that mirror the release number. The production manifests uses pinned versions as to not accidentally break people on new releases.
Helm supportA curated Chart for Kubernetes Helm that adds all components required to run Jaeger. UninstallingIf you need to remove the Jaeger components created by this template, run: kubectl delete all,daemonset,configmap -l jaeger-infra TestingTests are based on Arquillian Cube which require an active connection to
kubernetes cluster (via minikube start
./mvnw clean verify -Pcassandra,elasticsearch,all-in-one License |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论