MIT License

项目介绍

HariSekhon/Kubernetes-configs 是一个托管在 GitHub 上的开源项目,主要使用 Shell 编写,采用 MIT License 许可证,目前获得 540 个 Star、158 次 Fork。

仓库全名
HariSekhon/Kubernetes-configs
开源许可证
MIT License
Star 数
540
Fork 数
158

README 摘要

Kubernetes configs git.io/k8s-configs Intro Advanced Kubernetes YAML configurations & templates, based on my experiences running Kubernetes in production at different companies. The top-level directory contains standard Kubernetes object templates with many Best Practices, Tips & Tricks learned over time across production environments. The sub-directories contain ready-to-run real world apps that I've run across…

完整内容见 GitHub 原始 README 或本页 。

常见问题

Kubernetes-configs 用什么语言开发?

主要使用 Shell 编写,采用 MIT License 许可证,目前有 540 个 Star。

Kubernetes-configs 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 Kubernetes-configs 的源码?

可以直接克隆仓库:git clone https://github.com/HariSekhon/Kubernetes-configs.git,默认分支为 master;安装与运行步骤见仓库 README。

Kubernetes-configs 最近还在维护吗?

仓库最近一次更新为 2月3日,当前没有未关闭的 Issue;Star 数为 540,可作为社区活跃度的参考。

关于

Advanced Kubernetes YAML configs - Best Practices, Tips & Tricks, Production-Ready Checklist - experience from several production environments. AWS, GCP, Azure, ArgoCD, GKE, EKS, AKS, Nginx, Traefik, Kong, Cert Manager, CI/CD, Jenkins, Artifactory, TeamCity, GitHub Actions, Cloud SQL, FluxCD, Spinnaker, Selenium Grid, Moon, Helm + Kustomize

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

语言占比

Makefile
Ruby
Shell

贡献者

README

Kubernetes configs

GitHub stars GitHub forks Codacy Badge LineCount Cocomo License My LinkedIn GitHub Last Commit

CI Builds Overview Repo on GitHub Repo on GitLab Repo on Azure DevOps Repo on BitBucket

Kubevious Kustomize Installs Kustomize Namespace Kustomize Objects Namespaced YAML JSON Markdown Validation

Pluto Kustomize Nova Checkov Grype Kics Semgrep Semgrep Cloud Trivy

git.io/k8s-configs

Intro

Advanced Kubernetes YAML configurations & templates, based on my experiences running Kubernetes in production at different companies.

The top-level directory contains standard Kubernetes object templates with many Best Practices, Tips & Tricks learned over time across production environments.

The sub-directories contain ready-to-run real world apps that I’ve run across environments.

Templates

Start with deployment.yaml / statefulset.yaml, for advanced users see kustomization.yaml.

The service.yaml and ingress.yaml configs contain settings for using static public IP addresses and locking down your cloud load balancer’s firewall rules eg. to private IP addresses, and patches for Cloudflare Proxied or VPN IPs. You may need to extend those IP lists to your office / VPN / public addresses if really want to permit direct internet access to your ingresses and aren’t proxying them through a WAF in proxied mode etc.

See also the Dockerfile template in the HariSekhon/Templates repo to containerize your custom apps for deploying on to Kubernetes.

Apps

Real-world app deployments are found in the more specific <app>/ directories.

These follow the standard Kustomize <app>/base/ and <app>/overlay/ layout to make it easy to use as-is by just tweaking a couple settings in the overlay to your specific environment.

CI/CD

Advanced auto-scaling production-grade CI/CD on Kubernetes:

Helm Repos

Helm repos you should probably have installed:

Repo Label URL
stable https://charts.helm.sh/stable
bitnami https://charts.bitnami.com/bitnami
fairwinds-stable https://charts.fairwinds.com/stable

Table generated from helm-repos.txt by script generate_repos_markdown_table.sh

These repos can quickly installed in one command using script install_repos.sh:

./install_repos.sh

Helm + Kustomize integration

See kustomization.yaml for 2 methods provided:

  1. template the Helm chart using a values.yaml to Git and serve from there (see DevOps Bash Tools for the helm_template.sh convenience script)
  2. dynamically load the Helm chart from upstream with a values.yaml

…then patch override anything the chart doesn’t directly support using the standard Kustomize patching examples given in the kustomization.yaml.

Production Ready Checklist

This section has been moved and enhanced in my amazing Knowledge-Base repo:

Kubernetes Production Ready Checklist

Further Documentation

The best documentation links are provided at the top of each yaml for fast referencing (my advanced .vimrc can open these URLs from the current file via a hotkey!)

See also HariSekhon/Knowledge-Base, especially:

Extra Docs

Datree Kubernetes ArgoCD best practices

Environment Enhancements

.envrc - use with direnv to auto-load correct Kubernetes context isolated to current shell to avoid race conditions between shells and scripts caused by naively changing the global ~/.kube/config context

Shortcut symlinks are for faster instantiation from these configs using the standard kubernetes shortcuts such as new pvc.yaml - see the Templates repo for more details on the new command to fast create new files from templates.

Diagrams

For more amazing diagrams see HariSekhon/Diagrams-as-Code

Kubernetes Deployment with Horizontal Pod Autoscaler and Ingress

Kubernetes Stateful Architecture with persistent volumes

Kubernetes Service External Traffic Policy

Kubernetes on Premise

with MetalLB:

Is it just me or do MetaLB think they’re Starfleet? (compare their logos)

Traefik Ingress on GKE

A Traefik deployment I did for a client using:

alternative diagram:

Kong API Gateway on AWS EKS

A Kong API Gateway deployment I did for a client using:

Jenkins on Kubernetes

A production Jenkins on Kubernetes I built for a client with auto-spawning agents for horizontal scaling and integration with Docker, SonarQube, Clair, Grype and Trivy for code & container scanning.

Useful Notes

HariSekhon/Knowledge-Base - Jenkins

HariSekhon/Knowledge-Base - Jenkins-on-Kubernetes

screenshot:

ArgoCD - GitOps for Kubernetes

argocd.d2:

OpenTSDB on Kubernetes and HBase

A high scale production OpenTSDB replatform I did to Kubernetes for a client, ingesting 9 billion data points per day and serving 3 million queries per day.

I also had to do advanced performance tuning of their production HBase cluster which was suffering from frequent outages at this scale due to being set up by a non-SME on the wrong hardware (I had to make do with the existing hardware of course).

This was the second client I did in-depth performance tuning of HBase for - I’ve published a selection of useful HBase tools - see hbase_*.py and opentsdb_*.py in my DevOps Python tools repo.

History

Forked from the Templates repo.

Star History

Star History Chart

git.io/k8s-configs

More Core Repos

Knowledge

Knowledge-Base Diagrams-as-Code

DevOps Code

DevOps-Bash-tools DevOps-Python-tools DevOps-Perl-tools DevOps-Golang-tools

Containerization

Kubernetes-configs Dockerfiles

CI/CD

GitHub-Actions Jenkins

Databases - DBA - SQL

SQL-scripts

DevOps Reloaded

HAProxy-configs Terraform Packer Ansible Environments

Monitoring

Nagios-Plugins Nagios-Plugin-Kafka Prometheus

Templates

Templates Template-repo

Desktop

TamperMonkey Hammerspoon MPV-Scripts

Spotify

Spotify-tools Spotify-playlists

The rest of my original source repos are here.

Pre-built Docker images are available on my DockerHub and can be re-generated using the my Dockerfiles repo.

评论

暂无评论