GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - gt-sun/kubernetes-examples: Minimal self-contained examples of standard Kubernetes features and patterns in YAML

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

110 Commits
110 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
ClusterRole
ClusterRole
 
 
ClusterRoleBinding
ClusterRoleBinding
 
 
ConfigMap
ConfigMap
 
 
CronJob
CronJob
 
 
DaemonSet
DaemonSet
 
 
Deployment
Deployment
 
 
Endpoints
Endpoints
 
 
Ingress
Ingress
 
 
Job
Job
 
 
LimitRange
LimitRange
 
 
Namespace
Namespace
 
 
NetworkPolicy
NetworkPolicy
 
 
PersistentVolume
PersistentVolume
 
 
Pod
Pod
 
 
PodSecurityPolicy
PodSecurityPolicy
 
 
ResourceQuotas
ResourceQuotas
 
 
Role
Role
 
 
RoleBinding
RoleBinding
 
 
Secret
Secret
 
 
Service
Service
 
 
StatefulSet
StatefulSet
 
 
StorageClass
StorageClass
 
 
broken-Deployment/spec.spec.readinessProbe
broken-Deployment/spec.spec.readinessProbe
 
 
broken-Pod
broken-Pod
 
 
broken-Secret
broken-Secret
 
 
cloud-providers/gcp/https-ready-alb
cloud-providers/gcp/https-ready-alb
 
 
plugins
plugins
 
 
tests
tests
 
 
.supported-k8s-versions
.supported-k8s-versions
 
 
.yamllint
.yamllint
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
kubectl-examples
kubectl-examples
 
 

Repository files navigation

yamllint

Kubernetes Examples

A reference repository of YAML with canonical and as-simple-as-possible demonstrations of kubernetes functionality and features.

Why?

At Container Solutions we find we regularly need chunks of YAML to demonstrate something specific, such as:

  • A simple deployment

  • A simple pod

  • A pod with a volume

This might be to do a basic test of an environment, find an example to tinker with, or send to someone to get them going.

Usage

The examples can be used by a kubectl plugin examples. This plugin can be installed by krew:

  • first install krew
  • Install a custom plugin index: kubectl krew index add cs https://github.com/ContainerSolutions/kubernetes-examples.git
  • Install this plugin: kubectl krew install cs/examples

Interactively discover by first selecting the resource type:

$ kubectl examples

filter by resource type

$ kubectl examples Service

filter by resource type and pattern

$ kubectl examples Pod res

If there is only a single match selected by the parameters, it is printed to the stdout. So you can deploy a modified version of a sample by:

$ export KUBE_EDITOR='code -w'
$ kubectl examples Ingress fanout | kubectl create -f - --edit

Sections

broken-* - yamls that exemplify broken kubernetes yaml states

[A-Z][a-zA-Z]* - Example yamls that correspond to resource types.

test - Scripts to test or validate the YAML

Within those folders are either simple/canonical examples, or examples in subfolders that expose particular items of functionality that are highlighted by their yaml path, eg Pod/spec.initContainers/.

If an example is an exemplar of a particular feature but tightly related to another resource, then an absolute folder might be added eg in Service there is Service/Pod.spec.subdomain.

Symlinks are also used to make finding things easier, eg Service/headless-service -> Service/spec.clusterIP.

plugins - a directory following the spec for a Custom krew plugin index

Principles

The examples seek to be:

  • As simple as possible to illustrate the functionality

  • Self-contained (ie limited to one .yaml file)

  • Non-conflicting (eg resource names are unique)

  • Clear (eg resource names are verbose and unambiguous)

Sources / Thanks To

Official Kubernetes docs

Kubernetes by Example

Practical Kubernetes

Security Examples

About

Minimal self-contained examples of standard Kubernetes features and patterns in YAML

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.