Giter Site home page Giter Site logo

jukylin / jaeger-kubernetes Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jaegertracing/jaeger-kubernetes

1.0 2.0 0.0 81 KB

Support for deploying Jaeger into Kubernetes

Home Page: https://github.com/uber/jaeger

License: Apache License 2.0

Java 35.06% Shell 41.95% Batchfile 22.99%

jaeger-kubernetes's Introduction

Build Status

Jaeger Kubernetes Templates

Development setup

This template uses an in-memory storage with a limited functionality for local testing and development. Do not use this template in production environments.

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, kubectl get service jaeger-query tells you where to find Jaeger URL. If you are using minikube to setup your Kubernetes cluster, the command minikube service jaeger-query --url can be used instead.

Production setup

This template deploys the Collector, Query Service (with UI) and Cassandra storage (StatefulSet) as separate individually scalable services.

kubectl create -f https://raw.githubusercontent.com/jaegertracing/jaeger-kubernetes/master/production/jaeger-production-template.yml

Note that it's OK to have the Query and Collector pods to be in an error state for the first minute or so. This is because these components attempt to connect to Cassandra right away and hard fail if they can't after N attempts.

Once everything is ready, kubectl get service jaeger-query tells you where to find Jaeger URL.

Deploying the agent as sidecar

The 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. As such, it's ideal to have the Agent to be deployed as a sidecar to your application's component, just add it as a container within any struct that supports spec.containers, like a Pod, Deployment and so on.

For instance, assuming that your application is named myapp and the image is for it is mynamespace/hello-myimage, your Deployment descriptor would be something like:

- apiVersion: extensions/v1beta1
  kind: Deployment
  metadata:
    name: myapp
  spec:
    template:
      metadata:
        labels:
          app: 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: 5778
          - containerPort: 6831
            protocol: UDP
          - containerPort: 6832
            protocol: UDP
          command:
          - "/go/bin/agent-linux"
          - "--collector.host-port=jaeger-collector.jaeger-infra.svc:14267"

The Jaeger Agent will then be available to your application at localhost:5775/localhost:6831/localhost:6832. In most cases, you don't need to specify a hostname or port to your Jaeger Tracer, as it will default to the right values already.

Persistent storage

Even though this template uses a stateful Cassandra, backing storage is set to emptyDir. It's more appropriate to create a PersistentVolumeClaim/PersistentVolume and use it instead. Note that this Cassandra deployment does not support deleting pods or scaling down, as this might require administrative tasks that are dependent on the final deployment architecture.

Uninstalling

If you need to remove the Jaeger components created by this template, run:

kubectl delete all,daemonset -l jaeger-infra

Testing

Tests are based on Arquillian Cube which require an active connection to kubernetes cluster (via kubectl). When executing tests from IDE make sure that template is copied to target/test-classes.

minikube start
./mvnw clean verify -Pe2e

jaeger-kubernetes's People

Contributors

pavolloffay avatar jpkrohling avatar objectiser avatar

Stargazers

 avatar

Watchers

James Cloos avatar 742161455 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.