Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Simple kubernetes setup #210

Closed

Conversation

dineshg13
Copy link
Member

Fixes a part of #153
Adds kubernetes files to test webstore in a k8s cluster.

Changes

  1. Adds a new directory k8s_local with the setup necessary to run the demo webstore on a k8s cluster.
  2. Adds changes to Makefile to make easy to setup the services in k8s

Cons of the approach:

  1. We now a different config files for running services via docker-compose and k8s but that is inevitable as some of config are different are different in two environments.

@dineshg13 dineshg13 requested a review from a team July 15, 2022 04:14
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jul 15, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

@dineshg13 dineshg13 changed the title Add Simple kubernetes setup to test Add Simple kubernetes setup Jul 15, 2022
spec:
containers:
- name: adservice
image: otel/demo:v0.2.0-alpha-adservice
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the image tag version should be a variable, and keep up to date.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made this an env var that we set in Makefile. Let me know if there is a better way to achieve same.

Copy link
Member

@wph95 wph95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Communicated with the author via slack. It was agreed that the pr will be continued after the otel demo helm chart is completed.

@saurabhdes
Copy link
Contributor

I tested this on my Macbook Pro after creating a local cluster via kind. I see deployments getting created (e.g. for PaymentService, frontend etc. but no pods. I ran the command make k8s_local_apply . Not sure if i am missing something. When i do a describe on deployment e.g. kubectl describe deployment paymentservice, i noticed the image name seems incorrect otel/demo:-paymentservice and export DOCKER_IMAGE_VERSION=v0.2.0-alpha doesn't seem to be applied to the yaml file.

@dineshg13
Copy link
Member Author

@saurabhdes thanks for testing. I made a fix to makes sure env var is set properly in Makefile . Could you retest this ?

@saurabhdes
Copy link
Contributor

saurabhdes commented Jul 18, 2022

thanks @dineshg13 for the fix. I am still having same issues with my kind cluster (could be my machine issue). But i was able to deploy successfully on AKS cluster.

Screen Shot 2022-07-17 at 6 44 43 PM

Screen Shot 2022-07-17 at 6 48 35 PM

Not all services were there as i am running into a separate memory issue for the otel daemon set to run. I will try increasing memory size of AKS nodes.

@fatsheep9146
Copy link
Contributor

Not all services were there as i am running into a separate memory issue for the otel daemon set to run. I will try increasing memory size of AKS nodes.

Maybe consider only using limit for resources not request to avoid this kind of problem? @dineshg13

@saurabhdes
Copy link
Contributor

saurabhdes commented Jul 18, 2022

I removed this

resources:
            limits:
              cpu: 1
              memory: 2Gi
            requests:
              cpu: 100m
              memory: 400Mi

"resources" section from k8s_local/otel-agent-daemonset.yaml and after that the all the otel collector daemonset started. Then i saw more accurate flowmap in Jaeger.

image

@fatsheep9146
Copy link
Contributor

I removed this

resources:
            limits:
              cpu: 1
              memory: 2Gi
            requests:
              cpu: 100m
              memory: 400Mi

"resources" section from k8s_local/otel-agent-daemonset.yaml and after that the all the otel collector daemonset started. Then i saw more accurate flowmap in Jaeger.

image

Although this works, but I think it's the yaml with resources section is still important, since the resources spec is also important observation information. I think maybe a flag to switch between with-resource mode and without-resource mode is better. @dineshg13 @wph95

spec:
containers:
- name: adservice
image: otel/demo:${DOCKER_IMAGE_VERSION}-adservice
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

following #156, the package is now public, we could use ghcr.io/open-telemetry/demo now.

@dineshg13
Copy link
Member Author

Closing this in favor of open-telemetry/opentelemetry-helm-charts#280

@dineshg13 dineshg13 closed this Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants