• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

dennyzhang/kubernetes-yaml-templates: Kubernetes Yaml Templates

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

dennyzhang/kubernetes-yaml-templates

开源软件地址(OpenSource Url):

https://github.com/dennyzhang/kubernetes-yaml-templates

开源编程语言(OpenSource Language):


开源软件介绍(OpenSource Introduction):

1 Kubernetes Yaml Templates

linkedin
github
slack


PRs Welcome

File me Issues or star this repo.

1.1 Pod

YamlSummary
pod/pod-dummy.yamlStart a dummy pod with a dead sleep loop
pod/pod-nginx.yamlStart a pod of sample app(nginx)
pod/pod-initcontainer-sysctl.yamlUse initContainer to run sysctl, when starting a Pod
pod/pod-healthcheck-nginx.yamlStart pod with tcp and http healthcheck
pod/pod-secrets.yamlPod use secrets as either volumes or environment variables
pod/pod-gitclone.yamlPod: use initContainer as sidecar to web host a git repo
pod/pod-hostaliases.yamlPod: add alias to /etc/hosts
pod/pod-serviceaccount.yamlStart pod with serviceaccount, instead of default serviceaccount
pod/pod-handlers.yamlPod’s events whenever it get started or stoppped
ReferenceLink: kubectl cheatsheet

1.2 Volume

YamlSummary
volume/volume-manual-pv.yamlCreate pv first, then pvc
volume/volume-mount-localpath.yamlMount a local folder to pods
volume/volume-emptydir.yamlCreate a empty folder, then mount to pods
volume/volume-ebs.yamlMount EBS volume to pod running in amazon instance with the same AZ
volume/volume-nfs.yamlCreate nfs pv
volume/volume-gcePersistentDisk.yamlMount GCE disk to pod running in amazon instance with the same AZ
volume/volume-digitalocean.yamlCreate DigitalOcean volume for your kubernetes cluster in DigitalOcean
ReferenceLink: kubectl cheatsheet, Link: volumes examples

1.3 Service

YamlSummary
service/service-loadbalancer.yamlService: loadbalancer
service/service-nodeport.yamlService: nodeport
service/service-ingress.yamlService: ingress
service/service-clusterip-nginx.yamlService: nginx with clusterip
service/service-cassandra.yamlService: cassandra
ReferenceLink: kubectl cheatsheet

1.4 Configmap/Envs

YamlSummary
config/pod-configmap.yamlCreate configmap from file, then use it as a pod volume
config/pod-environment-var.yamlStart a pod passing environment variables
config/pod-env-metada.yamlExpose metadata to pods
config/configmap-plaintext.yamlDefine configmap with plain text

1.5 Security - RBAC

YamlSummary
rbac/serviceaccount-default.yamlServiceaccount: basic usage
rbac/rbac-default.yamlServiceaccount: concret example
ReferenceLink: kubectl cheatsheet

1.6 Security - PodSecurityPolicy

YamlSummary
podsecurity/securitycontext-user.yamlConfigure userid, at both pod and container levels
podsecurity/podsecurity-privileged.yamlCreate pod security with privileged access
podsecurity/podsecurity-restricted.yamlCreate pod security with restricted access, then apply it later
podsecurity/podsecurity-enforce.yamlEnforce policy security by defining role and cluster role
podsecurity/podsecurity-advanced.yamlA more complicated definition of pod security policy
podsecurity/podsecurity-example.yamlA full example with everything included
LinksLink: kubectl cheatsheet

1.7 Security - NetworkPolicy

YamlSummary
networksecurity/networksecurity-denyall-ingress.yamlAllow all ingress
networksecurity/networksecurity-allowall-ingress.yamlDeny all ingress
networksecurity/networksecurity-denyall.yamlDeny all ingress and egress
networksecurity/networksecurity-pod.yamlWhitelist traffic control
networksecurity/networksecurity-complicated.yamlA comprehensive network policy example
networksecurity/networksecurity-port.yamlAllow TCP 443 from one namespace
networksecurity/networksecurity-deny-othernamespaces.yamlDeny all ingress traffic from other namespaces
networksecurity/networksecurity-denyegress-exceptdns.yamlDeny all egress traffic except DNS
ReferenceLink: kubectl cheatsheet, GitHub: kubernetes-network-policy-recipes

1.8 Quota & Limits

YamlSummary
quota/limitrange-pvc-size.yamlLimitRange: PVC size
quota/limitrange-pvc-cumulative-size.yamlResourceQuota: pvc count and storage size
quota/limitrange-mem-size.yamlLimitRange: Pod ram usage. Then apply it to namespace
ReferenceLink: kubectl cheatsheet

1.9 Deployment

YamlSummary
deployment/deployment-nginx.yamlDeploy nginx with 2 replicas
deployment/deployment-mysql.yamlDeploy mysql
ReferenceLink: kubectl cheatsheet

1.10 Statefulset

YamlSummary
statefulset/statefulset-nginx.yamlStatefulset: nginx
statefulset/statefulset-single-mysqlStatefulset: mysql
statefulset/statefulset-replicated-cassandra.yamlStatefulset: single cassandra
statefulset/statefulset-replicated-mysqlStatefulset: cassandra with replicas
ReferenceLink: kubectl cheatsheet

1.11 Jobs & CronJob

YamlSummary
job/job-affinity.yamlDeploy a job with node affinity

1.12 HorizontalPodAutoscaler

YamlSummary
hpa/hpa-nginx.yamlDeploy a horizontal pod autoscaler for nginx deployment

1.13 Adhoc

YamlSummary
namespace/ns-dummy.yamlCreate a dummy namespace

1.14 Related Tools

NameSummary
GitHub: kubernetes-sigs/kustomizeCustomization of kubernetes YAML configurations

1.15 More Resources

License: Code is licensed under MIT License.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap