eldada / kubernetes-scripts Goto Github PK
View Code? Open in Web Editor NEWA collection of scripts and commands for various Kubernetes tasks
A collection of scripts and commands for various Kubernetes tasks
Hi there
Fine list of scripts, thank you for these.
I would have one addition. The use of the generator flag throws a warning because it has been deprecated.
kubectl run --generator=run-pod/v1 my-ubuntu --rm -i -t --image ubuntu -- bash
I think we should use the command like this now:
kubectl run my-ubuntu --rm -i -t --image ubuntu -- bash
Not sure if it helps, just an input ;)
kindly, riscie
looks like string interpolation fails, here is the error after enabling set -xv
. Error occurs for getPodsTopCSV.sh
, getResourcesCSV.sh
, and getRestartingPods.sh
.
> ./getPodsTopCSV.sh --namespace dev01 --pod dev01-prometheus-postgres-exporter-7c5bf75df4-rbn7x
######### Main #########
main "$@"
+ main --namespace dev01 --pod dev01-prometheus-postgres-exporter-7c5bf75df4-rbn7x
+ processOptions --namespace dev01 --pod dev01-prometheus-postgres-exporter-7c5bf75df4-rbn7x
+ [[ 4 -gt 0 ]]
+ case "$1" in
+ NAMESPACE='--namespace dev01'
+ shift 2
+ [[ 2 -gt 0 ]]
+ case "$1" in
+ POD=dev01-prometheus-postgres-exporter-7c5bf75df4-rbn7x
+ shift 2
+ [[ 0 -gt 0 ]]
+ '[' -z dev01-prometheus-postgres-exporter-7c5bf75df4-rbn7x ']'
+ '[' false == true ']'
+ echo 'Getting Pod memory and cpu usage'
Getting Pod memory and cpu usage
+ testConnection
+ kubectl cluster-info
+ kubectl get pod '--namespace dev01' dev01-prometheus-postgres-exporter-7c5bf75df4-rbn7x
Error: unknown flag: --namespace dev01
See 'kubectl get --help' for usage.
+ errorExit 'Pod dev01-prometheus-postgres-exporter-7c5bf75df4-rbn7x not found in namespace --namespace dev01'
+ echo -e '\nERROR: Pod dev01-prometheus-postgres-exporter-7c5bf75df4-rbn7x not found in namespace --namespace dev01\n'
ERROR: Pod dev01-prometheus-postgres-exporter-7c5bf75df4-rbn7x not found in namespace --namespace dev01
+ exit 1
bash info
> bash --version
GNU bash, version 5.0.18(1)-release (x86_64-apple-darwin18.7.0)
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
system info
> uname -a
Darwin bhutwala-mac 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun 18 20:50:10 PDT 2020; root:xnu-4903.278.43~1/RELEASE_X86_64 x86_64
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.