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

Top node and Top Pod missing reference to dist #1844

Open
suriya786 opened this issue Aug 20, 2024 · 1 comment
Open

Top node and Top Pod missing reference to dist #1844

suriya786 opened this issue Aug 20, 2024 · 1 comment

Comments

@suriya786
Copy link

Hi, Sir/Madam I am trying to use the example top node pod. Instead of kubernetes-client its pointed to dist. I was unable to find any reference in the forked files. Please advice.

https://github.com/kubernetes-client/javascript/blob/master/examples/top.js

@suriya786 suriya786 changed the title Top node and Top Pod missing reference dist Top node and Top Pod missing reference to dist Aug 20, 2024
@mstruebing
Copy link
Member

Hey @suriya786 it is pointed to dist in the examples to be able to use the code of the repository while working on it/to have the same exact version you've checked out.

In a real project you would use @kubernetes-client/node.

I was unable to find any reference in the forked files. Please advice.

What is your problem here?
If you are missing the dist directory, you would need to install and build the package yourself.
You can do this with a checked out repository: npm run install which also builds the package as part of it's npm scripts automatically. If you want to rebuild later with changes made you can run npm run build.
That creates the dist folder and you can run the example node ./examples/top_pods.js.

Alternatively, if you want to use it in a different project, you can run npm install @kubernetes-client/node and use const k8s = require('@kubernetes-client/node'); instead.

Hope this helps, feel free to ask more questions or close this issue if this answers your question.

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

No branches or pull requests

2 participants