Make it easy on yourself – use Kubernetes Short Names

When the Walker Bothers sang ‘Make it easy on yourself’ they was most definitely was not singing about Kubernetes.

However, if you want to make it easy on yourself, learn some of Kubernetes short names and save time typing all those kubectl commands.

Some don’t help much,

% kubectl get nodes
NAME          STATUS   ROLES   AGE   VERSION
10.0.10.154   Ready    node    45h   v1.20.8
10.0.10.179   Ready    node    45h   v1.20.8
10.0.10.95    Ready    node    45h   v1.20.8

or

% kubectl get no
NAME          STATUS   ROLES   AGE   VERSION
10.0.10.154   Ready    node    45h   v1.20.8
10.0.10.179   Ready    node    45h   v1.20.8
10.0.10.95    Ready    node    45h   v1.20.8

But others can be useful, for example:

% kubectl get storageclasses
NAME            PROVISIONER                       RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
oci (default)   oracle.com/oci                    Delete          Immediate              false                  45h
oci-bv          blockvolume.csi.oraclecloud.com   Delete          WaitForFirstConsumer   false                  45h

or

% kubectl get sc
NAME            PROVISIONER                       RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
oci (default)   oracle.com/oci                    Delete          Immediate              false                  45h
oci-bv          blockvolume.csi.oraclecloud.com   Delete          WaitForFirstConsumer   false                  45h

Below is a table I have started of Kubernetes Names, Short Names and Kind, as I discover new ones I will add them to the list:

NameShort NameKind
autopilotruleobjects aroAutopilotRuleObject
autopilotrulesarAutopilotRule
certificatesigningrequestscsrCertificateSigningRequest
clusterdomainsstatusescdsClusterDomainsStatus
clusterdomainupdates cduClusterDomainUpdate
componentstatuescsComponentStatus
configmaps cmConfigMap
cronjobscjCronJob
customresourcedefinitionscrd, crdsCustomResourceDefinition
daemonsetsdsDaemonSet
deploymentsdeployDeployment
endpointsepEndpoints
eventsevEvent
horizontalpodautoscalershpaHorizontalPodAutoscaler
ingressesingIngress
innodbclustersic, ics InnoDBCluster
limitrangeslimitsLimitRange
mysqlbackupsmkbMySQLBackup
namespacesnsNamespace
networkpoliciesnetpol NetworkPolicy
nodenoNode
persistentvolumeclaimspvcPersistentVolumeClaim
persistentvolumespvPersistentVolume
poddisruptionbudgetspdbPodDisruptionBudget
podspoPod
podsecuritypoliciespspPodSecurityPolicy
priorityclassespcPriorityClass
replicasetsrsReplicaSet
replicationcontrollersrcReplicationController
resourcequotasquotaResourceQuota
serviceaccountssaServiceAccount
servicessvcService
statefulsetsstsStatefulSet
storageclassesscStorageClass
storagenodessnStorageNode
volumeplacementstrategiesvps, vpVolumePlacementStrategy
kubectl api-resources –sort-by=name

Summary

If you discover a missing entry please let me know, so I can add it to the list.

[twitter-follow screen_name=’RonEkins’ show_count=’yes’]

Leave a Reply

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: