kubectl-aliases
metallb
Our great sponsors
kubectl-aliases | metallb | |
---|---|---|
7 | 78 | |
3,256 | 6,611 | |
- | 2.0% | |
3.1 | 9.4 | |
5 months ago | 4 days ago | |
Shell | Go | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
kubectl-aliases
-
☸️ Kubernetes: A Pragmatic Kubectl Aliases Collection
# autocomplete kubectl & helm source <(kubectl completion zsh) source <(helm completion zsh) alias k=kubectl # when using below aliases, print kubectl command and then execute it function kctl() { echo "+ kubectl $@" && command kubectl $@ } # add aliases collection like 'kgpo' for 'kubectl get pods` from https://github.com/ahmetb/kubectl-aliases [ ! -f ~/.kube/aliases.sh ] && curl -fsSL "https://raw.githubusercontent.com/ahmetb/kubectl-aliases/master/.kubectl_aliases" > ~/.kube/aliases.sh && sed -i -e 's/kubectl/kctl/g' ~/.kube/aliases.sh source ~/.kube/aliases.sh # set default namespace alias kn='kctl config set-context --current --namespace' # get events sorted by last timestamp alias kgel='kctl get events --sort-by=.lastTimestamp' # get events sorted by creation timestamp alias kgec='kctl get events --sort-by=.metadata.creationTimestamp' # get pod's descending events function kger() { kctl get events --sort-by=.lastTimestamp --field-selector involvedObject.name="$@" } # get 'real' all alias kgworld='kctl get $(kubectl api-resources --verbs=list --namespaced -o name | paste -sd ",")' # display all nodes resources request and limits alias kgnr="k get nodes --no-headers | awk '{print \$1}' | xargs -I {} sh -c 'echo {} ; kubectl describe node {} | grep Allocated -A 5 | grep -ve Event -ve Allocated -ve percent -ve -- ; echo '" # start a debug pod (including lots of troubleshooting tools) alias kdebug="kctl -n default run debug-$USER --rm -it --tty --image leodotcloud/swiss-army-knife:v0.12 --image-pull-policy=IfNotPresent -- bash" # get pod's containers list function kgpc() { kctl get pod -o jsonpath="{.spec.containers[*].name}" "$@" && echo "" } # ping a service, ex: 'kping whoami:8080' alias kping='kctl run httping -it --image bretfisher/httping --image-pull-policy=IfNotPresent --rm=true --' # get existing pod's yaml without forbidden fields, ex: 'kyaml pod whoami' function kyaml() { kubectl get "$@" -o yaml | kubectl-neat } # display and delete failed pods in current namespace alias krmfailed='kctl delete pods --field-selector=status.phase=Failed'
- Good and/or helpful aliases to know for CKA/CKAD/Daily use?
-
Aliasing kubectl with "kc"
I like https://github.com/ahmetb/kubectl-aliases because it helps keep the formal nomenclature in my head while providing faster terminal entry.
- What are your aliases?
- Most important discussion from KubeCon
-
Everything Useful I Know About kubectl
I would highly recommend not aliasing k to kubectl and instead get this: https://github.com/ahmetb/kubectl-aliases
- For local projects, do you change your node port range?
metallb
-
Self hosted kubernetes
Hey guys, I want to share a guide I’m pretty proud of which is talking about setting up kubernetes which leverages https://kubespray.io/#/ and https://metallb.universe.tf/ so you can host this yourself most people when spinning up kubernetes opt for k3s or get stuck with all the options or unable to setup the external ips for their services so these tools will eliminate the problem.
- Deploy web app in port 80 using kubernetes
-
How to load balance highly available bare metal Kubernetes cluster control plane nodes?
Have a closer look at MetallLB.
-
Trouble with RKE2 HA Setup: Part 2
To avoid that, you can use a combination of haproxy and keepalived, an enterprise grade load balancer like the one from F5 or Citrix. Besides that you can also work with https://kube-vip.io or https://metallb.universe.tf.
-
Kubernetes and feeling defeated
Not sure if klipper is usable in a cluster with multiple nodes, as it binds to one port only. You may want to use MetalLB instead: https://metallb.universe.tf/
-
Cool stuff to deploy for a project ideas
Then deploy MetalLB https://metallb.universe.tf/
- Load balance ingress for baremetal
-
Own kubernetes cluster
What issue do you see with the load balancer? For self hosted clusters, one can use MetalLB for example to have such single outfacing IP which will failover to another node keeping the same IP if a node dies.
-
PaperLB: A Kubernetes Network Load Balancer Implementation
Quoting from their docs:
-
libvirt-k8s-provisioner - Ansible and terraform to build a cluster from scratch in less than 10 minutes ok KVM - Updated for 1.26
metalLB to manage bare-metal LoadBalancer services - WIP - Only L2 configuration can be set-up via playbook.
What are some alternatives?
kube-ps1 - Kubernetes prompt info for bash and zsh
kube-vip - Kubernetes Control Plane Virtual IP and Load-Balancer
konfig - konfig helps to merge, split or import kubeconfig files
calico - Cloud native networking and network security
ingress - WIP Caddy 2 ingress controller for Kubernetes
ingress-nginx - Ingress-NGINX Controller for Kubernetes
kutectl - A couple of bash aliases and functions to make your life easier when dealing with kubectl.
external-dns - Configure external DNS servers (AWS Route53, Google CloudDNS and others) for Kubernetes Ingresses and Services
kubectl-tmux-exec - A kubectl plugin to control multiple pods simultaneously using Tmux
cert-manager - Automatically provision and manage TLS certificates in Kubernetes
daily-learnings - A collection of handy scripts, configs that I have learnt+wrote & forgot over time.
rancher - Complete container management platform