You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
We could refactor the examples folder to make it more readable and maintainable. Like creating a folder called kubectl/equivalents inside examples to give example for the corresponding kubectl command.
For example, creating NamespaceCreateEquivalent.js file which shows you the code equivalent to kubectl command: kubectl create namespace test
** Client Version **
e.g. 0.18.1
** Example Code**
PodsFilterByNamespace.js
constk8s=require('@kubernetes/client-node');constkc=newk8s.KubeConfig();kc.loadFromDefault();constk8sApi=kc.makeApiClient(k8s.CoreV1Api);/*This sample javascript code is equivalent to `kubectl get pod --namespace=demo-namespace`*/constmain=async()=>{try{constpodRes=awaitk8sApi.listNamespacedPod('demo-namespace');console.log('Pod: ',podRes.body.items[0].metadata);}catch(err){console.error(err);}};main();
Additional context
I have already started working on this and would love to get assigned for the same.
The text was updated successfully, but these errors were encountered:
Describe the bug
We could refactor the examples folder to make it more readable and maintainable. Like creating a folder called
kubectl/equivalents
inside examples to give example for the corresponding kubectl command.For example, creating
NamespaceCreateEquivalent.js
file which shows you the code equivalent to kubectl command:kubectl create namespace test
** Client Version **
e.g.
0.18.1
** Example Code**
PodsFilterByNamespace.js
Additional context
I have already started working on this and would love to get assigned for the same.
The text was updated successfully, but these errors were encountered: