A command-line interface for interacting with Kubernetes clusters, built with TypeScript.
npm install -g @kubernetesjs/cli
The CLI provides several commands for managing Kubernetes resources. You can use either k8s
or kubernetes
as the command prefix:
k8s <command> [options]
# or
kubernetes <command> [options]
Options:
-
--client-url
: Kubernetes API server URL (default: http://localhost:8001)
Retrieve information about Kubernetes resources.
k8s get <resource> [options]
Apply configurations to your Kubernetes cluster.
k8s apply -f <file> [options]
Delete resources from your Kubernetes cluster.
k8s delete <resource> <name> [options]
Show detailed information about a specific resource.
k8s describe <resource> <name> [options]
View logs from pods.
k8s logs <pod-name> [options]
Forward ports from pods to your local machine.
k8s port-forward <pod-name> <local-port>:<pod-port> [options]
Execute commands in a container.
k8s exec <pod-name> -- <command> [options]
Display information about the current cluster.
k8s cluster-info
Manage Kubernetes configuration.
k8s config [options]
k8s get pods
k8s apply -f deployment.yaml
k8s logs my-pod
k8s port-forward my-pod 8080:80
The CLI uses the default Kubernetes configuration from ~/.kube/config
. You can specify a different configuration file using the --kubeconfig
option.
When first cloning the repo:
yarn
# Build the production packages
yarn build
For development with source maps:
yarn
# Build with source maps for better debugging
yarn build:dev
Checkout these related projects:
-
schema-typescript
Provides robust tools for handling JSON schemas and converting them to TypeScript interfaces with ease and efficiency. -
@schema-typescript/cli
CLI is the command line utility forschema-typescript
. -
schema-sdk
Provides robust tools for handling OpenAPI schemas and converting them to TypeScript clients with ease and efficiency. -
starship
Unified Testing and Development for the Interchain.
🛠 Built by Hyperweb — if you like our tools, please checkout and contribute to our github ⚛️
AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED “AS IS”, AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND.
No developer or entity involved in creating this software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the code, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value.