https://github.com/flavono123/kubectl-eks-node
A kubectl plugin for list/describe EKS nodes
https://github.com/flavono123/kubectl-eks-node
Last synced: 2 months ago
JSON representation
A kubectl plugin for list/describe EKS nodes
- Host: GitHub
- URL: https://github.com/flavono123/kubectl-eks-node
- Owner: flavono123
- License: apache-2.0
- Created: 2023-01-11T15:23:44.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-06T07:00:38.000Z (over 2 years ago)
- Last Synced: 2025-01-30T07:28:54.194Z (4 months ago)
- Language: Shell
- Size: 22.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `kubectl eks-node`
## Install
### Get the latest script
```sh
$ wget -O /usr/local/bin/kubectl-eks_node https://raw.githubusercontent.com/flavono123/kubectl-eks-node/main/kubectl-eks_node && chmod +x /usr/local/bin/kubectl-eks_node
```### Krew
- From [the custom index](https://github.com/flavono123/flew-index)```sh
$ k krew index add flew https://github.com/flavono123/flew-index.git
$ k krew install flew/eks-node
```## Usage
```sh
Print the information on a eks node as JSONUsage:
eks-node
eks-node
eks-node po|podFilter types:
- avaliability_zone(az)
- instance_type(ins)
- nodegroup(ng)Examples:
# 1. Print the information on a eks node as JSON
$ kubectl eks-node ip-172-16-200-10.your.domain
{
"ip-172-16-200-10.your.domain": {
"nodegroup": "awsomenode",
"instance_type": "t3.small",
"zone": "ap-northeast-2a",
"pods": [
"pod-a",
"pod-b"
]
}
}# 2. Filter nodes by an availability zone
$ k eks-node az ap-northeast-2a
NAME STATUS ROLES AGE VERSION
ip-172-16-200-10.your.domain Ready 3d4h v1.23.9-eks-ba74326
ip-172-16-200-11.your.domain Ready 4h2m v1.23.9-eks-ba74326# By an instance type
$ k eks-node ins t3.large
NAME STATUS ROLES AGE VERSION
ip-172-16-200-10.your.domain Ready 3d4h v1.23.9-eks-ba74326
ip-172-16-201-10.your.domain Ready 16d v1.23.9-eks-ba74326
ip-172-16-202-10.your.domain Ready 80m v1.23.9-eks-ba74326
ip-172-16-200-12.your.domain Ready 5d7h v1.23.9-eks-ba74326
ip-172-16-201-11.your.domain Ready 3d4h v1.23.9-eks-ba74326# By a nodegroup
$ k eks-node ng awsomenode
NAME STATUS ROLES AGE VERSION
ip-172-16-200-10.your.domain Ready 3d4h v1.23.9-eks-ba74326# Or print the node information where the specified pod is running
$ k eks-node po awsomepod-xxxxxxxxxx-yyyyy
{
"ip-172-16-200-10.your.domain": {
"nodegroup": "awsomenode",
"instance_type": "t3.small",
"zone": "ap-northeast-2a",
"pods": [
"awsomepod-xxxxxxxxxx-yyyyy",
"pod-a",
"pod-b"
]
}
}
```