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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: