Introduction

Short defines ops-friendly syntax for Kubernetes manifests.

This section includes information about

Short approach

Short follows the same basic principles for Short'ing all Kubernetes types.

We look at each resource and define Short syntax for it based on the principles above.

All Kubernetes resources have the TypeMeta and ObjectMeta structures embedded in them. The Short syntax pulls the contents of these structures to the top-level Key.

Type Meta

A Kubernetes structure looks like this

apiVersion: v1
kind: Pod
...

where the type of the resource is inferred using the value in kind field, along with the apiGroup (from apiVersion).

The equivalent Short structure looks like this

pod: 
...

Object Meta

ObjectMeta in each of the Kubernetes resources is used to define metadata about the object such as name, labels, namespace and annotations. These fields are pulled up to the top-level key in Short.

A Kubernetes structure with ObjectMeta looks like this

apiVersion: v1
kind: Pod
metadata:
  name: Pod_Name
  labels: 
    Name: Pod_Name
  namespace: default
  annotations:
    Data: Value
...

The equivalent Short structure looks like this

pod:
  name: Pod_Name
  labels:
    Name: Pod_Name
  namespace: default
  annotations: 
    Data: Value
...

The fields within Spec and Status are Short'ed using similar principles applied to each of their fields.

Resources

The following types are currently supported

Kubernetes API Group Kubernetes Type Short Type Skeleton Examples
core/v1 Pod Pod Pod Skeleton Pod Examples
core/v1 Service Service Service Skeleton Service Examples
extensions/v1beta1 Deployment Deployment Deployment Skeleton Deployment Examples
apps/v1beta1 Deployment Deployment Deployment Skeleton Deployment Examples
apps/v1beta2 Deployment Deployment Deployment Skeleton Deployment Examples
extensions/v1beta1 Replica Set Replica Set Replica Set Skeleton Replica Set Examples
apps/v1beta2 Replica Set Replica Set Replica Set Skeleton Replica Set Examples
core/v1 Replication Controller Replication Controller Replication Controller Skeleton Replication Controller Examples
batch/v1 Job Job Job Skeleton Job Examples
extensions/v1beta1 DaemonSet DaemonSet DaemonSet Skeleton DaemonSet Examples
apps/v1beta2 DaemonSet DaemonSet DaemonSet Skeleton DaemonSet Examples
batch/v2alpha1 CronJob CronJob CronJob Skeleton CronJob Examples
batch/v1beta1 CronJob CronJob CronJob Skeleton CronJob Examples
apps/v1beta1 StatefulSet StatefulSet StatefulSet Skeleton StatefulSet Examples
apps/v1beta2 StatefulSet StatefulSet StatefulSet Skeleton StatefulSet Examples
core/v1 PersistentVolumeClaim PersistentVolumeClaim PersistentVolumeClaim Skeleton PersistentVolumeClaim Examples
storage/v1 StorageClass StorageClass StorageClass Skeleton StorageClass Examples
core/v1 Endpoint Endpoint Endpoint Skeleton Endpoint Examples
core/v1 PersistentVolume PersistentVolume PersistentVolume Skeleton PersistentVolume Examples
extensions/v1beta1 Ingress Ingress Ingress Skeleton Ingress Examples
core/v1 ConfigMap ConfigMap ConfigMap Skeleton ConfigMap Examples
core/v1 Secret Secret Secret Skeleton Secret Examples
apps/v1 ControllerRevision ControllerRevision ControllerRevision Skeleton ControllerRevision Examples