It is a command line interface used for running commands against K8 cluster master node API server. It has a config file called “kubeconfig” which maintains cluster information for authentication and connecting to API server.
Syntax
a) command: It accepts operation name i.e. create,
apply, get, delete, describe, exec, log
b) Type: It accepts resource type in the form of
singular, plural or abbreviated. Resource types are case-insensitive
The below three commands gives same result
See the following table data with resource type and abbreviated name (i.e. short name)
Name |
ShortName |
KIND |
pods |
po |
Pod |
configmaps |
cm |
ConfigMap |
namespaces |
ns |
Namespace |
nodes |
no |
Node |
replicationcontrollers |
rc |
ReplicationController |
secrets |
|
Secret |
services |
svc |
Service |
deployments |
deploy |
Deployment |
replicasets |
rs |
ReplicaSet |
ingresses |
ing |
Ingress |
cronjobs |
cj |
CronJob |
c) Name: It is used for specifying name of the resource and it is case-sensitive.
Examples:
- Kubernetes for Developers #25: PersistentVolume and PersistentVolumeClaim in-detail
- Kubernetes for Developers #24: Kubernetes Volume hostPath in-detail
- Kubernetes for Developers #23: Kubernetes Volume emptyDir in-detail
- Kubernetes for Developers #22: Access to Multiple Clusters or Namespaces using kubectl and kubeconfig
- Kubernetes for Developers #21: Kubernetes Namespace in-detail
- Kubernetes for Developers #20: Create Automated Tasks using Jobs and CronJobs
- Kubernetes for Developers #19: Manage app credentials using Kubernetes Secrets
- Kubernetes for Developers #18: Manage app settings using Kubernetes ConfigMap
- Kubernetes for Developers #17: Expose service using Kubernetes Ingress
- Kubernetes for Developers #16: Kubernetes Service Types - ClusterIP, NodePort, LoadBalancer and ExternalName
- Kubernetes for Developers #15: Kubernetes Service YAML manifest in-detail
- Kubernetes for Developers #14: Kubernetes Deployment YAML manifest in-detail
- Kubernetes for Developers #13: Effective way of using K8 Readiness Probe
- Kubernetes for Developers #12: Effective way of using K8 Liveness Probe
- Kubernetes for Developers #11: Pod Organization using Labels
- Kubernetes for Developers #10: Kubernetes Pod YAML manifest in-detail
- Kubernetes for Developers #9: Kubernetes Pod Lifecycle
- Kubernetes for Developers #8: Kubernetes Object Name, Labels, Selectors and Namespace
- Kubernetes for Developers #7: Imperative vs. Declarative Kubernetes Objects
- Kubernetes for Developers #6: Kubernetes Objects
- Kubernetes for Developers #5: Kubernetes Web UI Dashboard
- Kubernetes for Developers #4: Enable kubectl bash autocompletion
- Kubernetes for Developers #3: kubectl CLI
- Kubernetes for Developers #2: Kubernetes for Local Development
- Kubernetes for Developers #1: Kubernetes Architecture and Features
No comments:
Post a Comment