https://github.com/tool3/kpods
𝌤 kubernetes pod management cli
https://github.com/tool3/kpods
cli javascript kubernetes nodejs npm
Last synced: over 1 year ago
JSON representation
𝌤 kubernetes pod management cli
- Host: GitHub
- URL: https://github.com/tool3/kpods
- Owner: tool3
- License: mit
- Created: 2019-12-28T15:55:38.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-09-06T06:07:00.000Z (almost 4 years ago)
- Last Synced: 2025-02-14T11:10:06.517Z (over 1 year ago)
- Topics: cli, javascript, kubernetes, nodejs, npm
- Language: JavaScript
- Homepage: https://tool3.github.io/kpods
- Size: 1.53 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
```bash
_ _
/\_\ /\ \
/ / / _ / \ \
/ / / /\_\ / /\ \ \
/ / /__/ / / / / /\ \_\
/ /\_____/ / / / /_/ / /
/ /\_______/ / / /__\/ /
/ / /\ \ \ / / /_____/
/ / / \ \ \ / / /
/ / / \ \ \ / / /
\/_/ \_\_\\/_/
k8s pods cli
```
[](https://travis-ci.org/tool3/kpods) [](https://www.npmjs.com/package/@tool3/kpods)
kpods is a small, frictionless kubernetes pod management utility that works with kubernetes-dashboard APIs.
no kubeconfig, minimal setup.
# install
`npm install -g @tool3/kpods`
once installed, it will be available globally as `kp` and `kpods`.
# config
`kp` expects you to have the following environment variables available:
- `KP_URL` - the k8s dashboard URL.
- `KP_TOKEN` - authorization bearer token (without Bearer).
- `KP_ENV` - the default namespace.
You can also run with `--url, -u | --env, -e | --token, -t` and provide overrides on demand.
# usage
`kp` or `kp --help` to see available commands and options.
# multi cluster
given you have multiple clusters and hence multiple k8s dashboards, you can store env variables in files (`.properties` for example) and export them based on the current namespace you are working with, for example:
#### KP_DEV.properties
```bash
export KP_URL="your k8s dashboard url"
export KP_ENV="dev" #assuming your namespace in dev cluster is also dev
export KP_TOKEN="your bearer token (without Bearer)"
```
#### KP_PROD.properties
```bash
export KP_URL="your k8s dashboard url"
export KP_ENV="prod" #assuming your namespace in prod cluster is also prod
export KP_TOKEN="your bearer token (without Bearer)"
```
#### usage example
using one of the `kp` configs (dev in this example), is as easy as:
```bash
source KP_DEV.properties
```
or better yet:
```bash
. KP_DEV.properties
```
so essentially keeping 2 terminal tabs each for it's own `kp` config, or update them on the fly!