Comments (7)
@dmitry-mightydevops first let me say a massive thank you for your donation. Thank you I really appreciate it.
Also I have just pushed a large update that fixes the match flag and hides the Type column, if it's needed again -T will show the container type.
let me know if you have any issues or problems
from kubectl-ice.
I have added the --show-node flag to print the node name in the column output
from kubectl-ice.
this took some doing... I have node labels working on my minikube setup but I'm unable to test with multiple nodes so would appreciate some feedback.
I have added --node-label and --pod-label flags they take a single label name and output the label as a new column (see output below)
currently you can't use the sort and match flags with the node-labels and pod-labels though
kubectl-ice status -A --show-node --node-label "minikube.k8s.io/version"
T NAMESPACE NODE PODNAME CONTAINER minikube.k8s.io/version READY STARTED RESTARTS STATE REASON EXIT-CODE SIGNAL AGE
S kube-system minikube coredns-78fcd69978-gtg8c coredns v1.24.0 true true 26 Running - - - 4d9h
S kube-system minikube etcd-minikube etcd v1.24.0 true true 26 Running - - - 4d9h
S kube-system minikube kube-apiserver-minikube kube-apiserver v1.24.0 true true 6 Running - - - 4d9h
S kube-system minikube kube-controller-manager-minikube kube-controller-manager v1.24.0 true true 6 Running - - - 4d9h
S kube-system minikube kube-proxy-4p6q8 kube-proxy v1.24.0 true true 26 Running - - - 4d9h
S kube-system minikube kube-scheduler-minikube kube-scheduler v1.24.0 true true 6 Running - - - 4d9h
S kube-system minikube metrics-server-77c99ccb96-z86xc metrics-server v1.24.0 true true 33 Running - - - 4d9h
S kube-system minikube storage-provisioner storage-provisioner v1.24.0 true true 43 Running - - - 4d9h
$ kubectl-ice status -A --show-node --node-label "beta.kubernetes.io/os" --pod-label "component"
T NAMESPACE NODE PODNAME CONTAINER beta.kubernetes.io/os component READY STARTED RESTARTS STATE REASON EXIT-CODE SIGNAL AGE
S kube-system minikube coredns-78fcd69978-gtg8c coredns linux - true true 26 Running - - - 4d9h
S kube-system minikube etcd-minikube etcd linux etcd true true 26 Running - - - 4d9h
S kube-system minikube kube-apiserver-minikube kube-apiserver linux kube-apiserver true true 6 Running - - - 4d9h
S kube-system minikube kube-controller-manager-minikube kube-controller-manager linux kube-controller-manager true true 6 Running - - - 4d9h
S kube-system minikube kube-proxy-4p6q8 kube-proxy linux - true true 26 Running - - - 4d9h
S kube-system minikube kube-scheduler-minikube kube-scheduler linux kube-scheduler true true 6 Running - - - 4d9h
S kube-system minikube metrics-server-77c99ccb96-z86xc metrics-server linux - true true 33 Running - - - 4d9h
S kube-system minikube storage-provisioner storage-provisioner linux - true true 43 Running - - - 4d9h
$ kubectl-ice status -A --show-node --node-label "beta.kubernetes.io/os" --pod-label "component" --tree --details
NAMESPACE NODE beta.kubernetes.io/os component NAME READY STARTED RESTARTS STATE REASON EXIT-CODE SIGNAL TIMESTAMP MESSAGE
kube-system minikube linux - Pod/coredns-78fcd69978-gtg8c - - 0 Running - - - 2022-05-20 09:40:06 -
kube-system minikube linux - └─Container/coredns true true 26 Running - - - 2022-06-20 08:55:56 -
kube-system minikube linux etcd Pod/etcd-minikube - - 0 Running - - - 2022-06-06 09:10:17 -
kube-system minikube linux etcd └─Container/etcd true true 26 Running - - - 2022-06-20 08:55:50 -
kube-system minikube linux kube-apiserver Pod/kube-apiserver-minikube - - 0 Running - - - 2022-05-23 10:52:33 -
kube-system minikube linux kube-apiserver └─Container/kube-apiserver true true 6 Running - - - 2022-06-20 08:55:50 -
kube-system minikube linux kube-controller-manager Pod/kube-controller-manager-minikube - - 0 Running - - - 2022-06-06 09:11:58 -
kube-system minikube linux kube-controller-manager └─Container/kube-controller-manager true true 6 Running - - - 2022-06-20 08:55:50 -
kube-system minikube linux - Pod/kube-proxy-4p6q8 - - 0 Running - - - 2022-05-20 09:40:06 -
kube-system minikube linux - └─Container/kube-proxy true true 26 Running - - - 2022-06-20 08:55:56 -
kube-system minikube linux kube-scheduler Pod/kube-scheduler-minikube - - 0 Running - - - 2022-06-18 10:25:00 -
kube-system minikube linux kube-scheduler └─Container/kube-scheduler true true 6 Running - - - 2022-06-20 08:55:50 -
kube-system minikube linux - Pod/metrics-server-77c99ccb96-z86xc - - 0 Running - - - 2022-05-20 09:40:17 -
kube-system minikube linux - └─Container/metrics-server true true 33 Running - - - 2022-06-20 08:55:56 -
kube-system minikube linux - Pod/storage-provisioner - - 0 Running - - - 2022-05-20 09:40:06 -
kube-system minikube linux - └─Container/storage-provisioner true true 43 Running - - - 2022-06-20 08:56:38 -
from kubectl-ice.
@NimbleArchitect it would be nice to skip "I" containers in the same way you did with cpu/memory output (i.e. -i arg to the cli)
➜ kubectl-ice status --show-node --node-label "workload" --pod-label "app.kubernetes.io/component"
T NODE PODNAME CONTAINER workload app.kubernetes.io/component READY STARTED RESTARTS STATE REASON EXIT-CODE SIGNAL AGE
S ip-10-120-3-53.ec2.internal prod-backend-v1-7bb984f4d4-jk9df backend apps backend true true 0 Running - - - 10h
I ip-10-120-3-53.ec2.internal prod-backend-v1-7bb984f4d4-jk9df install apps backend true - 0 Terminated Completed 0 0 10h
S ip-10-120-3-53.ec2.internal prod-frontend-v1-5696b46985-nv7vd frontend apps frontend true true 0 Running - - - 10h
from kubectl-ice.
is that just removing the T column or removing init containers from the table output?
if you just want to remove the init containers from the output you can use --match "T!=I"
which means only output the line if the "T" column does not equal "I" (uppercase i).
edit: the match flag doesn't work correctly atm, I'll work on a fix soon.
from kubectl-ice.
didn't work for me
➜ kubectl-ice status --show-node --node-label "workload" --pod-label "app.kubernetes.io/component" --match "T!=I"
T NODE PODNAME CONTAINER workload app.kubernetes.io/component READY STARTED RESTARTS STATE REASON EXIT-CODE SIGNAL AGE
S ip-10-110-4-28.ec2.internal staging-backend-v1-57dd8d95f4-lpnf2 backend apps backend true true 0 Running - - - 11d
I ip-10-110-4-28.ec2.internal staging-backend-v1-57dd8d95f4-lpnf2 get-config-template apps backend true - 0 Terminated Completed 0 0 11d
I ip-10-110-4-28.ec2.internal staging-backend-v1-57dd8d95f4-lpnf2 install apps backend true - 0 Terminated Completed 0 0 11d
so I expect this in outcome to skip terminated init containers:
➜ kubectl-ice status --show-node --node-label "workload" --pod-label "app.kubernetes.io/component" --tree | sed -n '/Terminated/!p'
NODE workload app.kubernetes.io/component NAME READY STARTED RESTARTS STATE REASON EXIT-CODE SIGNAL AGE
ip-10-110-4-28.ec2.internal apps backend Pod/staging-backend-v1-57dd8d95f4-lpnf2 - - 0 Running - - - 11d
ip-10-110-4-28.ec2.internal apps backend └─Container/backend true true 0 Running - - - 11d
from kubectl-ice.
you're very welcome!
confirmed that it worked as expected:
➜ kubectl-ice status --show-node --node-label "workload" --pod-label "app.kubernetes.io/component" --match "STATE!=Terminated"
NODE PODNAME CONTAINER workload app.kubernetes.io/component READY STARTED RESTARTS STATE REASON EXIT-CODE SIGNAL AGE
ip-10-110-4-28.ec2.internal staging-backend-v1-57dd8d95f4-lpnf2 backend apps backend true true 0 Running - - - 17d
from kubectl-ice.
Related Issues (15)
- does not handle DownwardAPI volume types HOT 1
- I love the plugin so so...much. How can I donate you some money? HOT 2
- Colorizing output HOT 5
- init containers always shown HOT 2
- how much I love the tool :) HOT 1
- Wrong probe name in `kubectl ice probes` output
- ice ip doesn't honor args HOT 4
- kubectl ice cpu - incorrect value (v0.0.9+) HOT 3
- skip type = "I" containers HOT 5
- memory used format HOT 2
- Error: failed to create clientset: no Auth Provider found for name "oidc" HOT 3
- priority class HOT 4
- failed to create clientset HOT 4
- status: revisualize to enhance UX HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kubectl-ice.