@kubernetesjs/cli v0.3.0
@kubernetesjs/cli
A command-line interface for interacting with Kubernetes clusters, built with TypeScript.
Installation
npm install -g @kubernetesjs/cliUsage
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)
Available Commands
Get
Retrieve information about Kubernetes resources.
k8s get <resource> [options]Apply
Apply configurations to your Kubernetes cluster.
k8s apply -f <file> [options]Delete
Delete resources from your Kubernetes cluster.
k8s delete <resource> <name> [options]Describe
Show detailed information about a specific resource.
k8s describe <resource> <name> [options]Logs
View logs from pods.
k8s logs <pod-name> [options]Port Forward
Forward ports from pods to your local machine.
k8s port-forward <pod-name> <local-port>:<pod-port> [options]Exec
Execute commands in a container.
k8s exec <pod-name> -- <command> [options]Cluster Info
Display information about the current cluster.
k8s cluster-infoConfig
Manage Kubernetes configuration.
k8s config [options]Examples
Get Pod Information
k8s get podsApply a Configuration File
k8s apply -f deployment.yamlView Pod Logs
k8s logs my-podPort Forward to a Service
k8s port-forward my-pod 8080:80Configuration
The CLI uses the default Kubernetes configuration from ~/.kube/config. You can specify a different configuration file using the --kubeconfig option.
Development
When first cloning the repo:
yarn
# Build the production packages
yarn buildFor development with source maps:
yarn
# Build with source maps for better debugging
yarn build:devRelated
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.starshipUnified Testing and Development for the Interchain.
Credits
🛠 Built by Hyperweb — if you like our tools, please checkout and contribute to our github ⚛️
Disclaimer
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.