Kubeclt Command
|
Purpose
|
kubectl api-versions
|
This command will print the
supported versions of API on the cluster.
|
kubectl apply –f
<filename>
|
This command will configure
a resource by file or stdin
|
kubectl attach <pod> –c
<container>
|
This command will attach things to
the running container.
|
kubectl
cluster-info
|
This command will display the
cluster Information.
|
kubectl cluster-info dump
|
This command will dump relevant
information regarding cluster for debugging and diagnosis.
|
kubectl config
<SUBCOMMAD>
|
This command will Modifies the kubeconfig file.
|
kubectl config current-context
|
This will display displays the
current context.
|
kubectl config
delete-cluster <Cluster Name>
|
This will delete the
specified cluster from kubeconfig
|
kubectl config delete-context
<Context Name>
|
This command will delete a specified
context from kubeconfig.
|
kubectl config
get-cluster
|
This command will display
cluster defined in the kubeconfig.
|
kubectl config get-context
<Context Name>
|
This command will Describe one or
many contexts.
|
kubectl config
set-credentials cluster-admin --username = ankur --
password = SesrweU9l75qciy
|
This command will Set the user entry in kubeconfig
|
kubectl config set PROPERTY_NAME
PROPERTY_VALUE
|
This command will set an individual
value in kubeconfig file.
|
kubectl config
use-context <Context Name>
|
This command will set the
current context in kubectl file.
|
kubectl cp <Files from source>
<Files to Destinatiion>
|
This command will copy files and
directories to and from containers.
|
kubectl create –f
<File Name>
|
This command will create the
resources by filename.
|
kubectl replace -f FILENAME
|
This command will replace a resource
by file name or stdin.
|
Kubectl rollout
<Sub Command>
|
This command is capable of
managing the rollout of deployment.
|
kubectl set image (-f FILENAME |
TYPE NAME)
|
This command will update the image
of a pod template.
|
kubectl top node
[node Name]
|
This command will display
CPU/Memory/Storage usage.
|
|
|