$ cat insecure-proxy.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: prom-proxy| #!/bin/bash | |
| # | |
| # Install: | |
| # $ echo 'source ~/bin/aws-assume-role' >> ~/.bashrc | |
| # | |
| # Usage: | |
| # $ aws-assume-role [name] | |
| # | |
| # Prerequisite: | |
| # Create an IAM role like this in the account you what access: |
| #!/bin/bash | |
| reset="$(tput sgr0)" | |
| bold="$(tput bold)" | |
| red="$(tput setaf 1)" | |
| green="$(tput setaf 2)" | |
| yellow="$(tput setaf 3)" | |
| gray="$(tput setaf 8)" | |
| magenta="$(tput setaf 13)" |
| #!/bin/bash | |
| function usage() | |
| { | |
| echo Usage: $0 '[--cpu/-c|--memory/-m]' nodes... | |
| echo Sort by memory is the default | |
| exit ${1:-0} | |
| } | |
| node_names=() |
| #!/bin/bash | |
| kubectl api-resources --verbs=list -o name --namespaced=false | while read kind; do | |
| echo -n "$kind: " | |
| kubectl get --ignore-not-found -A $kind | wc -l | |
| done 2>/dev/null | |
| kubectl api-resources --verbs=list -o name --namespaced=true | while read kind; do | |
| echo -n "$kind: " | |
| kubectl get --ignore-not-found -A $kind | wc -l |
| #!/bin/bash | |
| function usage() | |
| { | |
| echo Usage: $0 '[--namespace NS/-n NS] [--all/-a|POD...]' | |
| exit $1 | |
| } | |
| all_pods=false | |
| pod_names=() |
| #!/bin/bash | |
| # | |
| # Install `fzf` and copy this file to your $PATH and use like this: | |
| # | |
| # $ kubectl pfz -n default --open-url mysvc | |
| # | |
| function usage() | |
| { | |
| echo Usage: $0 '[--namespace NS/-n NS] [-o|--open-url] [service...]' |
| #!/bin/bash | |
| function usage() | |
| { | |
| echo Usage: $0 '[--cpu/-c|--memory/-m]' nodes... | |
| echo Sort by memory is the default | |
| exit ${1:-0} | |
| } | |
| node_names=() |
| #!/bin/bash | |
| COLOR_LIGHT_GREEN="$(tput setaf 10)" | |
| COLOR_RESET="$(tput sgr0)" | |
| function kubecfg() | |
| { | |
| if [ $# -eq 0 ]; then | |
| echo $KUBECONFIG | |
| return |
How to get the latest patch-level version from a list of distinct versions using bash and awk. This idea was taken from https://stackoverflow.com/a/21103864/1006369
Supose you have the following list of versions:
v1.22.8
v1.22.9
v1.22.10 <-- latest v1.22 series
v1.23.1