Intro Managment tool
K8S Managment Tools
There is a variety of management tools available for kuberntes. These tools interface with kuberntes to provide additional functionality. When using kubernetes, it is a good idea to be aware of some of these tools.
What is kubectl ?
Kubectl is the official command line interface for kubernetes. it is the main method we will use to work with kuberntes in this course.
Syntax
kubectl [command] [TYPE] [NAME] [flags]
where command, TYPE, NAME, and flags are:
command: Specifies the operation that you want to perform on one or more resources, for examplecreate,get,describe,delete.TYPE: Specifies the resource type. Resource types are case-insensitive and you can specify the singular, plural, or abbreviated forms. For example, the following commands produce the same output:kubectl get pod pod1 kubectl get pods pod1 kubectl get po pod1
NAME: Specifies the name of the resource. Names are case-sensitive. If the name is omitted, details for all resources are displayed, for examplekubectl get pods.When performing an operation on multiple resources, you can specify each resource by type and name or specify one or more files:
To specify resources by type and name:
To group resources if they are all the same type:
TYPE1 name1 name2 name<#>.
Example:kubectl get pod example-pod1 example-pod2To specify multiple resource types individually:
TYPE1/name1 TYPE1/name2 TYPE2/name3 TYPE<#>/name<#>.
Example:kubectl get pod/example-pod1 replicationcontroller/example-rc1
To specify resources with one or more files:
-f file1 -f file2 -f file<#>- Use YAML rather than JSON since YAML tends to be more user-friendly, especially for configuration files.
Example:kubectl get -f ./pod.yaml
- Use YAML rather than JSON since YAML tends to be more user-friendly, especially for configuration files.
flags: Specifies optional flags. For example, you can use the-sor--serverflags to specify the address and port of the Kubernetes API server.
Kubeadm is a tool built to provide kubeadm init and kubeadm join as best-practice "fast paths" for creating Kubernetes clusters.
kubeadm performs the actions necessary to get a minimum viable cluster up and running. By design, it cares only about bootstrapping, not about provisioning machines.
Comments
Post a Comment