Code Monkey home page Code Monkey logo

aws-xray-kubernetes's People

Contributors

ankon avatar ckassen avatar dependabot[bot] avatar mikeapted avatar ovalba avatar yutachaos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

aws-xray-kubernetes's Issues

XRay Daemon routing issue

I tired to reproduce what was presented in this blog post and at the first sight all seems to look ok.

But after verification, I discovered, that when serviceA is accessing xray daemon it is doing it via kubernetes service - so it is loadballanced, and request can be routed to daemon deployed on other node than the application.

So instead of this:

It looks more like this:
Zrzut ekranu 2020-05-15 o 15 47 45

When deploying the container using a DaemonSet, the X-Ray port is also exposed directly on the host. This way, clients can connect directly to the daemon on your node. This avoids unnecessary network traffic going across your cluster.

So my question is how to achieve this? How to connect to xray on same node.

Communication issue with XRay Daemon

Following the instructions in the repo and the blog post results in some issues. Not sure if it's only in my environment.

The services (service-a and service-b) don't start. See below.

NAMESPACE     NAME                             READY   STATUS             RESTARTS   AGE
default       pod/service-a-8699d4bf68-65f5x   0/1     CrashLoopBackOff   11         32m
default       pod/service-a-8699d4bf68-hh2l5   0/1     CrashLoopBackOff   11         32m
default       pod/service-b-86564fd46b-b4ft8   0/1     CrashLoopBackOff   11         32m
default       pod/service-b-86564fd46b-kvplc   0/1     CrashLoopBackOff   11         32m
demo-app ➤ kubectl logs  pod/service-a-8699d4bf68-65f5x
/usr/src/app/node_modules/aws-xray-sdk-core/lib/daemon_config.js:26
    throw new Error('Invalid Daemon Address. You must specify an ip and port.');
    ^

Error: Invalid Daemon Address. You must specify an ip and port.
    at processAddress (/usr/src/app/node_modules/aws-xray-sdk-core/lib/daemon_config.js:26:11)
    at Object.<anonymous> (/usr/src/app/node_modules/aws-xray-sdk-core/lib/daemon_config.js:62:3)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/src/app/node_modules/aws-xray-sdk-core/lib/segment_emitter.js:105:17)

There seems to be an issue communicating with the X-Ray daemonset. However, the it seems to be running properly.

demo-app ➤ kubectl logs pod/xray-daemon-5v7zt
2020-03-27T14:53:29Z [Info] Initializing AWS X-Ray daemon 2.1.3
2020-03-27T14:53:29Z [Info] Using buffer memory limit of 76 MB
2020-03-27T14:53:29Z [Info] 1216 segment buffers allocated
2020-03-27T14:53:29Z [Info] Using region: us-east-2

Another recommendation I have is to update the K8s deployment template to v1 instead of v1beta so we can use selectors

Unsure of need for cluster-admin / host networking

From looking at documentation, it doesn't look like the xray daemon needs cluster-admin permissions (or any kubernetes api access whatsoever) or host networking enabled. Is there anything I've missed or can those be safely removed from the manifest?

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.