Welcome to my page!
DevOps engineer from New Delhi 🇮🇳
credly.com/dguyhasnoname
CKAD-TheHardWay | Site | ||||
k8s-day2-ops | Site | ||||
k8s-cluster-checker | Site | ||||
kube-wrench | Site |
This repository contain scripts for Kubernetes day 2 operations
Welcome to my page!
DevOps engineer from New Delhi 🇮🇳
credly.com/dguyhasnoname
CKAD-TheHardWay | Site | ||||
k8s-day2-ops | Site | ||||
k8s-cluster-checker | Site | ||||
kube-wrench | Site |
Hello,
env: AWS EKS
version: 1.17
Grafana: 7.1.5
I've three issues:
I found this script from your link on sturrent/k8s-check-deprecated-apis#1, which was very helpful, thank you!
However, i found that there's a bug in the regex for getting the current version:
kubectl get nodes -o json \
> | jq -r '.items[].status.nodeInfo.kubeletVersion' | uniq | sed 's/\v//g'
v1.18.9-eks-d1db3c
This then sets the version incorrectly further in the script:
Gathering info of current cluster...
Current k8s version: vv1.18.9-eks-d1db3c
With this change, it works correctly:
--- k8s-deprecations.sh 2021-03-30 14:25:46.000000000 -0600
+++ k8s-deprecations.sh-new 2021-03-30 14:21:15.000000000 -0600
@@ -46,7 +46,7 @@
echo "Gathering info of current cluster..."
current_k8s_version="$(kubectl get nodes -o json \
- | jq -r '.items[].status.nodeInfo.kubeletVersion' | uniq | sed 's/\v//g')"
+ | jq -r '.items[].status.nodeInfo.kubeletVersion' | uniq | sed 's/^v//g')"
echo "Current k8s version: v$current_k8s_version"
version="$(echo $current_k8s_version | sed 's/\(.*\)\..*/\1/').0"
k8s-day2-ops/kubelet/kubelet_check.sh
Line 15 in 80f8702
could be used without awk:
kubectl get nodes -o=jsonpath='{range .items[*]}{.metadata.name}{"\n"}'
or
k get nodes --no-headers -o custom-columns=NAME:.metadata.name
I get the following error when trying to run the k8s-toppur.py file
Traceback (most recent call last): File "/Users/myusername/dev/tools/k8s-day2-ops/resource_calcuation/k8s-toppur/k8s-toppur.py", line 7, in <module> from modules.kube_config import KubeConfig File "/Users/myusername/dev/tools/k8s-day2-ops/resource_calcuation/k8s-toppur/modules/kube_config.py", line 1, in <module> from kubernetes import config, client ModuleNotFoundError: No module named 'kubernetes'
I have exported my kubeconfig path to KUBECONFIG.
Can you suggest what the issue is please?
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.