All Projects → dguyhasnoname → k8s-day2-ops

dguyhasnoname / k8s-day2-ops

Licence: other
This repository contain scripts for Kubernetes day 2 operations

Programming Languages

shell
77523 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to k8s-day2-ops

Sonobuoy
Sonobuoy is a diagnostic tool that makes it easier to understand the state of a Kubernetes cluster by running a set of Kubernetes conformance tests and other plugins in an accessible and non-destructive manner.
Stars: ✭ 2,442 (+9668%)
Mutual labels:  kubernetes-cluster, kubernetes-deployment
ansible-role-rke2
Ansible Role to install RKE2 Kubernetes.
Stars: ✭ 118 (+372%)
Mutual labels:  kubernetes-cluster, kubernetes-deployment
Kubectl Doctor
kubectl cluster triage plugin for k8s - 🏥 (brew doctor equivalent)
Stars: ✭ 209 (+736%)
Mutual labels:  kubernetes-cluster, kubernetes-deployment
Kubernix
Single dependency Kubernetes clusters for local testing, experimenting and development
Stars: ✭ 545 (+2080%)
Mutual labels:  kubernetes-cluster, kubernetes-deployment
GPU-Kubernetes-Guide
How to setup a production-grade Kubernetes GPU cluster on Paperspace in 10 minutes for $10
Stars: ✭ 34 (+36%)
Mutual labels:  kubernetes-cluster, kubernetes-deployment
Hkube
Kubernetes cluster deployment to Hetzner Cloud
Stars: ✭ 55 (+120%)
Mutual labels:  kubernetes-cluster, kubernetes-deployment
kubernetes-starterkit
A launchpad for developers to learn Kubernetes from scratch and deployment of microservices on a kubernetes cluster.
Stars: ✭ 39 (+56%)
Mutual labels:  kubernetes-cluster, kubernetes-deployment
Kubernetes Tutorial
Running Kubernetes cluster Locally tutorial
Stars: ✭ 257 (+928%)
Mutual labels:  kubernetes-cluster, kubernetes-deployment
bulletinApi
Bulletin board scalable API
Stars: ✭ 35 (+40%)
Mutual labels:  kubernetes-cluster, kubernetes-deployment
eks-anywhere
Run Amazon EKS on your own infrastructure 🚀
Stars: ✭ 1,633 (+6432%)
Mutual labels:  kubernetes-cluster, kubernetes-deployment
Kubernetes Workshop
⚙️ A Gentle introduction to Kubernetes with more than just the basics. 🌟 Give it a star if you like it.
Stars: ✭ 3,122 (+12388%)
Mutual labels:  kubernetes-cluster, kubernetes-deployment
ansible-role-k8s
This role render an arbitrary number of Jinja2 templates and deploys or removes them to/from Kubernetes clusters.
Stars: ✭ 26 (+4%)
Mutual labels:  kubernetes-cluster, kubernetes-deployment
Kubekey
Provides a flexible, rapid and convenient way to install Kubernetes only, both Kubernetes and KubeSphere, and related cloud-native add-ons. It is also an efficient tool to scale and upgrade your cluster.
Stars: ✭ 288 (+1052%)
Mutual labels:  kubernetes-cluster, kubernetes-deployment
Ops Cli
Ops - cli wrapper for Terraform, Ansible, Helmfile and SSH for cloud automation
Stars: ✭ 152 (+508%)
Mutual labels:  kubernetes-cluster, kubernetes-deployment
Eksctl
The official CLI for Amazon EKS
Stars: ✭ 3,550 (+14100%)
Mutual labels:  kubernetes-cluster, kubernetes-deployment
Metalk8s
An opinionated Kubernetes distribution with a focus on long-term on-prem deployments
Stars: ✭ 217 (+768%)
Mutual labels:  kubernetes-cluster, kubernetes-deployment
spring-cloud-microservices-on-kubernetes
My Best Practices in development and deployment of Spring Cloud Microservices on Kubernetes.
Stars: ✭ 19 (-24%)
Mutual labels:  kubernetes-cluster, kubernetes-deployment
k3s-on-prem-production
Playbooks needed to set up an on-premises K3s cluster and securize it
Stars: ✭ 108 (+332%)
Mutual labels:  kubernetes-cluster, kubernetes-deployment
terraform-vultr-condor
Kubernetes Deployment Tool for Vultr
Stars: ✭ 60 (+140%)
Mutual labels:  kubernetes-cluster, kubernetes-deployment
admission-webhook-example-with-openfaas
Use OpenFaaS functions as Kubernetes Validating Admission Webhook
Stars: ✭ 24 (-4%)
Mutual labels:  kubernetes-cluster

k8s-day2-ops

This repository contain scripts for Kubernetes day 2 operations

Index of scripts

  1. kubelet scripts
    • kubelet_check.sh
      • This scripts checks kubelet status for all nodes in cluster.
  2. k8s namespace operation scripts
    • debug_app_namespace.sh
      • This script helps debugging issues in a namespace.
    • get_namespace_objects.sh
      • This script fetches all kinds of objects present in namespace.
    • probe_namespace_errors.sh
      • This script tries to find errors across all pods in a namespace.
  3. k8s pod operation scripts
    • container_exitcode.sh
      • This script finds exit codes for exited containers.
    • multiple_pod_delete.sh
      • This script can be used to delete multiple pods having a string common in their name.
    • pod_error_count.sh
  4. k8s cluster resource calculation scripts
    • k8s-toppur:
      • This tool calculates runtime resource usage in a cluster.
      • based on python k8s client.
  5. k8s cluster upgrade related scripts
    • k8s-deprecations.sh
      • This script lists all apiVersion deprecations in a cluster alongwith namespace: object relation.
      • This script works for k8s version > 1.x.x
    • k8s-tarmac
      • a quick tool to perform health-check of control plane workloads in a cluster post upgrade

Buy Me A Coffee

Sample run

k8s-toppur

image

debug_app_namespace.sh

image

get_namespace_objects.sh

image1

probe_namespace_errors.sh

image2

k8s-deprecations.sh


Current k8s version: v1.15.10
Fetching all objects from kubenetes repo: v1.15.0...
Fetching all objects from kubenetes repo: v1.16.0...
Fetching all objects from kubenetes repo: v1.17.0...
Fetching all objects from kubenetes repo: v1.18.0...

Below is the list of deprecated apiVersion which may impact objects in cluster: 

CSINode: storage/v1beta1
ControllerRevision: apps/v1beta1
ControllerRevision: apps/v1beta2
RollbackConfig: apps/v1beta1
RollbackConfig: extensions/v1beta1
StatefulSet: apps/v1beta1
StatefulSet: apps/v1beta2


Checking if CSINode kind objects exists in the cluster... 
CSINode kind objects found which may be using deprecated apiVersion: storage/v1beta1
          ✔ 0 CSINode using deprecated apiVersion: storage/v1beta1

Checking if ControllerRevision kind objects exists in the cluster... 
ControllerRevision kind objects found which may be using deprecated apiVersion: apps/v1beta1 apps/v1beta2
          ✔ 0 ControllerRevision using deprecated apiVersion: apps/v1beta1
          ✔ 0 ControllerRevision using deprecated apiVersion: apps/v1beta2

Checking if DaemonSet kind objects exists in the cluster... 
DaemonSet kind objects found which may be using deprecated apiVersion: apps/v1beta2 extensions/v1beta1
          ✔ 0 DaemonSet using deprecated apiVersion: apps/v1beta2
          Deprecated DaemonSet found using deprecated apiVersion: extensions/v1beta1
          kube-system: calico-node
          kube-system: calico-node-etcd

Checking if Deployment kind objects exists in the cluster... 
Deployment kind objects found which may be using deprecated apiVersion: apps/v1beta1 apps/v1beta2 extensions/v1beta1
          ✔ 0 Deployment using deprecated apiVersion: apps/v1beta1
          ✔ 0 Deployment using deprecated apiVersion: apps/v1beta2
          Deprecated Deployment found using deprecated apiVersion: extensions/v1beta1
          argo-rollouts: argo-rollouts
          foo-stg-6f80c2986a84: foo-api
          foo-stg-6f80c2986a84: foo-api-worker
          foo-stg-6f80c2986a84: foo-stg-api-foo-stg-api
          ohmy-dev-6febc2d60998: ohmy-app
          ohmy-dev-6febc2d60998: app
          ohmy-dev-6febc2d60998: snow-range
          ✔ 0 Deployment using deprecated apiVersion: apps/v1beta1
          Deprecated Deployment found using deprecated apiVersion: extensions/v1beta1
          argo-rollouts: argo-rollouts
          foo-stg-6f80c2986a84: foo-api
          foo-stg-6f80c2986a84: foo-api-worker
          bar-stg-991da1f546fa: helm-operator-stg
          kube-system: kube-test
          kube-system: metrics-server
          kube-system: nginx-ingress-nginx-ingress-controller
          kube-system: nginx-ingress-nginx-ingress-default-backend
          kube-system: velero
          monitoring: monitoring-nginx-ingress-nginx-ingress-controller

Checking if DeploymentRollback kind objects exists in the cluster... 
✔ DeploymentRollback: no deprecated objects found!

Checking if IPBlock kind objects exists in the cluster... 
✔ IPBlock: no deprecated objects found!

Checking if Ingress kind objects exists in the cluster... 
Ingress kind objects found which may be using deprecated apiVersion: extensions/v1beta1
          Deprecated Ingress found using deprecated apiVersion: extensions/v1beta1
          foo-stg-6f80c2986a84: foo-api
          foo-stg-6f80c2986a84: foo-stg-api-foo-stg-api
          foo-dev-6f80c2986a84: foo-api
          foo-dev-e78264053e02: e2e-jenkins
          kube-system: argo-ui
          kube-system: dashboard-proxy-oauth2-proxy
          kube-system: dex-dex-operator-config-dex-config
          kube-system: k8s-kibana-proxy-k8s-kibana-proxy
          kube-system: kube-login-kube-login
          monitoring: prometheus-operator-prometheus

Checking if NetworkPolicy kind objects exists in the cluster... 
NetworkPolicy kind objects found which may be using deprecated apiVersion: extensions/v1beta1
          Deprecated NetworkPolicy found using deprecated apiVersion: extensions/v1beta1
          foo-stg-6f80c2986a84: foo-stg-6f80c2986a84-default-deny-policy
          foo-stg-6f80c2986a84: foo-stg-6f80c2986a84-networkpolicy-ingress
          foo-stg-6f80c2986a84: nginx-ingress-controller
          foo-stg-6f80c2986a84: nginx-ingress-default-backend
          kube-system: nginx-ingress-default-backend
          ohmy-dev-6febc2d60998: ohmy-dev-6febc2d60998-default-deny-policy
          ohmy-dev-6febc2d60998: ohmy-dev-6febc2d60998-networkpolicy-ingress

Checking if NetworkPolicyEgressRule kind objects exists in the cluster... 
✔ NetworkPolicyEgressRule: no deprecated objects found!

Checking if NetworkPolicyIngressRule kind objects exists in the cluster... 
✔ NetworkPolicyIngressRule: no deprecated objects found!

Checking if NetworkPolicyList kind objects exists in the cluster... 
✔ NetworkPolicyList: no deprecated objects found!

Checking if NetworkPolicyPeer kind objects exists in the cluster... 
✔ NetworkPolicyPeer: no deprecated objects found!

Checking if NetworkPolicyPort kind objects exists in the cluster... 
✔ NetworkPolicyPort: no deprecated objects found!

Checking if NetworkPolicySpec kind objects exists in the cluster... 
✔ NetworkPolicySpec: no deprecated objects found!

Checking if PriorityClass kind objects exists in the cluster... 
PriorityClass kind objects found which may be using deprecated apiVersion: scheduling/v1alpha1 scheduling/v1beta1
          ✔ 0 PriorityClass using deprecated apiVersion: scheduling/v1alpha1
          ✔ 0 PriorityClass using deprecated apiVersion: scheduling/v1beta1

Checking if ReplicaSet kind objects exists in the cluster... 
ReplicaSet kind objects found which may be using deprecated apiVersion: apps/v1beta2 extensions/v1beta1
          ✔ 0 ReplicaSet using deprecated apiVersion: apps/v1beta2
          Deprecated ReplicaSet found using deprecated apiVersion: extensions/v1beta1
          argo-rollouts: argo-rollouts-579bf64cd
          foo-stg-6f80c2986a84: foo-api-54f8649d8d
          foo-stg-6f80c2986a84: foo-api-5f498f5475
          foo-prod-6f80c2986a84: foo-api-worker-6857c7f9d
          foo-prod-6f80c2986a84: foo-api-worker-6d6bb98d4
          kube-system: argo-workflow-controller-78ddf46ddc
          kube-system: calico-kube-controllers-844d6d45b9
          kube-system: calico-typha-5c6768dc56
          kube-system: cluster-autoscaler-aws-cluster-autoscaler-84d974d6c6
          kube-system: coredns-5c98db65d4
          kube-system: coredns-5d4dd4b4db
          kube-system: dashboard-heapster-5c4587888f
          ohmy-dev-6febc2d60998: ohmy-app-65d774bf9f
          ohmy-dev-6febc2d60998: ohmy-app-6cc7845d5c
          ohmy-dev-6febc2d60998: snow-range-87fc9d575
          ohmy-dev-6febc2d60998: snow-range-fbc9867d6

Checking if RollbackConfig kind objects exists in the cluster... 
✔ RollbackConfig: no deprecated objects found!

Checking if StatefulSet kind objects exists in the cluster... 
StatefulSet kind objects found which may be using deprecated apiVersion: apps/v1beta1 apps/v1beta2
          ✔ 0 StatefulSet using deprecated apiVersion: apps/v1beta1
          ✔ 0 StatefulSet using deprecated apiVersion: apps/v1beta2

Upgrade path:
v1.15.10 >>> v1.16.x >>> v1.17.x >>> v1.18.x  

Total time taken: 101s

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].