ameerthehacker / kubelive Goto Github PK
View Code? Open in Web Editor NEWkubectl tool reinvented to be more reactive and interactive :fire:
Home Page: https://www.npmjs.com/package/kubelive
License: MIT License
kubectl tool reinvented to be more reactive and interactive :fire:
Home Page: https://www.npmjs.com/package/kubelive
License: MIT License
Is your feature request related to a problem? Please describe.
A similar CLI had a similar problem, in that they creators chose d
as a shortcut to delete. However, the side effect was that it became too easy to accidentally delete something.
Describe the solution you'd like
Allow customized key bindings? Turn "deletion" hotkey off by default, with a configuration option to allow it, while showing the user how to bind a key to it.
Describe alternatives you've considered
n/a
Additional context
n/a
Describe the bug
No matter what kubelive
command I try to run, it just hangs and displays the following message:
(node:49973) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
To Reproduce
Steps to reproduce the behavior:
Just run kubelive
or kubelive get pods
Expected behavior
kubelive
doesn't hang and doesn't display error messages
Desktop (please complete the following information):
Describe the bug
When running kubelive
I get the error:
Error: No active cluster!
To Reproduce
Run kubelive get pods
or even just kubelive
.
Desktop (please complete the following information):
Additional context
My KUBECONFIG
is a composite of multiple config files e.g.:
$ echo $KUBECONFIG
/home/raman/.kube/kube1-config:/home/raman/.kube/kube2-config:/home/raman/.kube/minikube-config:/home/raman/.kube/config
kubectl get pods
deals with this just fine.
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
[ pods listed here ]
โ api git:(master) kubelive get pod
/Users/alexmiles/.nvm/versions/node/v8.11.1/lib/node_modules/kubelive/node_modules/@kubernetes/client-node/dist/config_types.js:18
throw new Error(`clusters[${i}].cluster.server is missing`);
^
Error: clusters[1].cluster.server is missing
at /Users/alexmiles/.nvm/versions/node/v8.11.1/lib/node_modules/kubelive/node_modules/@kubernetes/client-node/dist/config_types.js:18:19
at Function._.map._.collect (/Users/alexmiles/.nvm/versions/node/v8.11.1/lib/node_modules/kubelive/node_modules/underscore/underscore.js:205:24)
at Object.newClusters (/Users/alexmiles/.nvm/versions/node/v8.11.1/lib/node_modules/kubelive/node_modules/@kubernetes/client-node/dist/config_types.js:6:14)
at KubeConfig.loadFromString (/Users/alexmiles/.nvm/versions/node/v8.11.1/lib/node_modules/kubelive/node_modules/@kubernetes/client-node/dist/config.js:94:40)
at KubeConfig.loadFromFile (/Users/alexmiles/.nvm/versions/node/v8.11.1/lib/node_modules/kubelive/node_modules/@kubernetes/client-node/dist/config.js:65:14)
at KubeConfig.loadFromDefault (/Users/alexmiles/.nvm/versions/node/v8.11.1/lib/node_modules/kubelive/node_modules/@kubernetes/client-node/dist/config.js:201:22)
at Object.<anonymous> (/Users/alexmiles/.nvm/versions/node/v8.11.1/lib/node_modules/kubelive/kube/api.js:5:4)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
Cool tool and excited to get it working!
Is your feature request related to a problem? Please describe.
When a lot of resources are deployed it is not easy to find one or it will be cut off.
Describe the solution you'd like
Deploy dozens of resources and try to see them with the tool
Describe alternatives you've considered
None
Additional context
Describe the bug
When trying to visualize pods in a cluster with a large number of namespaces (36 namespaces in thi s case), there's not enough space in one line to show all the namespace names, and only the numbers are shown (some of them get ellipsized too). This makes selecting a namespace practically not possible.
Probably this will happen with smaller screens, or with long-named namespaces too.
To Reproduce
Steps to reproduce the behavior:
kubelive get pod
Expected behavior
My suggestion is to allow the namespace list to extend to more than one line if needed. A more complex option is to implement some kind of "scrolling" (like top
, or journalctl
).
Screenshots
Unfortunately, i'd prefer not to attach any screenshot, as i'm not authorized to share any information about the clusters i work with. I'll try to create an empty temporal cluster with fake namespaces.
Desktop (please complete the following information):
Describe the bug
Getting error"Unable to connect to the kube cluster: UNABLE_TO_GET_ISSUER_CERT"
My kubeconfig is using a self signed cert to connect to the cluster. The CA and private key exist in the kubeconfig.
To Reproduce
kubelive get pod
Expected behavior
Shows pods
Desktop (please complete the following information):
Describe the bug
Just installed the tool with :
sudo npm install -g kubelive
and when trying to use it :
$ export KUBECONFIG=<PATH_TO_KUBECONFIG_FILE>
$ kubectl cluster-info
Kubernetes master is running at ...
KubeDNS is running at ...
Metrics-server is running at ...
$ kubelive
/usr/local/lib/node_modules/kubelive/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
throw ex;
^
TypeError: Object.entries is not a function
at Module.assembleStyles [as exports] (/usr/local/lib/node_modules/kubelive/node_modules/slice-ansi/node_modules/ansi-styles/index.js:123:42)
at Function.Module._load (module.js:440:16)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/lib/node_modules/kubelive/node_modules/slice-ansi/index.js:4:20)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
Expected behavior
kubelive displays help message
Desktop (please complete the following information):
Additional context
$ kubectl version --short
Client Version: v1.17.0
Server Version: v1.16.6
$npm -v
3.5.2
Describe the bug
Unable to see which namespace the tool is displaying if there are too many namespaces.
To Reproduce
Steps to reproduce the behavior:
kubelive get pod
Expected behavior
To be able to see which namespaces I can switch to or use the flag -n
to specify a namespace prior to running the tool.
On top of that, even if I could see which namespace is currently displayed I still would have to click through a lot of namespaces to get to where I might want to go.
I have more than 30 namespaces per k8s cluster. When using kubelive get
I always start with the first one and need to switch to the correct namespace.
It would be great if kubelive could use namespace from kubectl as default (kubectl already knows what my namespace from current context)
Describe the bug
Unable to run on Cygwin
To Reproduce
Able to run help/version commands but unable to run rest of them.
$ kubelive -v
1.5.0
Screenshots
$ kubelive get pod
Warning: Failed prop type: The prop `isRawModeSupported` is marked as required in `TabsWithStdin`, but its value is `undefined`.
in TabsWithStdin (created by Context.Consumer)
in Tabs (created by NamespacesComponent)
in NamespacesComponent (created by Namespaces)
in Namespaces (created by App)
in App
in App
The above error occurred in the <TableComponent> component:
in TableComponent (created by PodsComponent)
in PodsComponent (created by BaseContainer)
in BaseContainer (created by Pods)
in Pods (created by Context.Consumer)
in App
in App
React will try to recreate this component tree from scratch using the error boundary you provided, App.
(node:27136) UnhandledPromiseRejectionWarning: Error: Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.
Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported
at Object.setRawMode (C:\Users\kkhanna\AppData\Roaming\npm\node_modules\kubelive\node_modules\ink\build\components\App.js:48:17)
at TableComponent.componentDidMount (C:\Users\kkhanna\AppData\Roaming\npm\node_modules\kubelive\src\components\table.js:54:16)
at commitLifeCycles (C:\Users\kkhanna\AppData\Roaming\npm\node_modules\kubelive\node_modules\react-reconciler\cjs\react-reconciler.development.js:12096:22)
at commitLayoutEffects (C:\Users\kkhanna\AppData\Roaming\npm\node_modules\kubelive\node_modules\react-reconciler\cjs\react-reconciler.development.js:15342:7)
at Object.invokeGuardedCallbackImpl (C:\Users\kkhanna\AppData\Roaming\npm\node_modules\kubelive\node_modules\react-reconciler\cjs\react-reconciler.development.js:11563:10)
at invokeGuardedCallback (C:\Users\kkhanna\AppData\Roaming\npm\node_modules\kubelive\node_modules\react-reconciler\cjs\react-reconciler.development.js:11740:31)
at commitRootImpl (C:\Users\kkhanna\AppData\Roaming\npm\node_modules\kubelive\node_modules\react-reconciler\cjs\react-reconciler.development.js:15080:9)
at unstable_runWithPriority (C:\Users\kkhanna\AppData\Roaming\npm\node_modules\kubelive\node_modules\scheduler\cjs\scheduler.development.js:697:12)
at runWithPriority (C:\Users\kkhanna\AppData\Roaming\npm\node_modules\kubelive\node_modules\react-reconciler\cjs\react-reconciler.development.js:1881:10)
at commitRoot (C:\Users\kkhanna\AppData\Roaming\npm\node_modules\kubelive\node_modules\react-reconciler\cjs\react-reconciler.development.js:14920:3)
(node:27136) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:27136) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
in Namespaces (created by App)
in App
Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
in App
Desktop (please complete the following information):
$ node -v
v12.18.2
$ npm -v
6.14.5
Additional context
Add any other context about the problem here.
I am usually trying to manage multiple clusters at once.
Describe the solution you'd like
A clear and concise description of what you want to happen.
It would be nice to leave my configured context/cluster (kubectl config set-context
) alone and just inline kubelive get pods --context=$CLUSTER0_CTX
, similar to kubectl
Thanks for the great tool! Just as a suggestion of something that would really help me, on top of #36, would be to be able to pass a -n
flag to identify the namespace you would like to start kubelive
in.
Ex. kubelive -n dev
would start kubelive in the dev namespace
Describe the bug
Does not work because of yoga-layout-prebuilt
, i think. Fresh installed npm
.
To Reproduce
Steps to reproduce the behavior:
npm install -g kubelive
kubelive get pods
/usr/local/lib/node_modules/kubelive/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
throw ex;
^
Error: ENOENT: no such file or directory, open
at Object.openSync (fs.js:465:3)
at Object.readFileSync (fs.js:368:35)
at KubeConfig.loadFromFile (/usr/local/lib/node_modules/kubelive/node_modules/@kubernetes/client-node/dist/config.js:69:32)
at KubeConfig.loadFromDefault (/usr/local/lib/node_modules/kubelive/node_modules/@kubernetes/client-node/dist/config.js:202:18)
at Object.<anonymous> (/usr/local/lib/node_modules/kubelive/src/kube/api.js:7:4)
at Module._compile (internal/modules/cjs/loader.js:1201:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
at Module.load (internal/modules/cjs/loader.js:1050:32)
at Function.Module._load (internal/modules/cjs/loader.js:938:14)
at Module.require (internal/modules/cjs/loader.js:1090:19) {
errno: -2,
syscall: 'open',
code: 'ENOENT'
}
Expected behavior
Should work?
npm --version: 6.14.6
Is your feature request related to a problem? Please describe.
While I'm using the kubectl
, always use short names of resources like kubectl get svc
or kubectl get po
. Currently kubelive
not supports this shortcuts.
Describe the solution you'd like
I think it will be very useful kubelive
supports them. Currently kubelive get svc
saysresource svc is not supported
and I think it should be equal with kubelive get services
Describe alternatives you've considered
N/A
Additional context
You can get all shortcuts supported by the kubectl
with just typing kubectl api-resources
Thanks
Describe the bug
When we have more than 100 namespaces, Kubelive cannot list all the namespaces defaults to last namespaces.
To Reproduce
MACHINE :- MacBook Pro
NPM :- NPM install from brew {brew install npm}
KUBELIVE :- Installed kubeve live from npm (npm install -g kubelive)
Ran npm install -g kubelive
Then kubelive
gives me error:
/Users/ry/.nvm/versions/node/v8.0.0/lib/node_modules/kubelive/node_modules/clipboardy/lib/macos.js:5
...process.env,
^^^
SyntaxError: Unexpected token ...
at createScript (vm.js:74:10)
at Object.runInThisContext (vm.js:116:10)
at Module._compile (module.js:533:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/ry/.nvm/versions/node/v8.0.0/lib/node_modules/kubelive/node_modules/clipboardy/index.js:4:15)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.