一.什么是k8s:
全名kubenetes,容器编排工具,分布式的架构,可能对docker以及其余容器进行主动部署,弹性伸缩和治理
二.k8s的架构:
分布式的,一个master节点(属于是主节点)和多个node节点(计算节点),master就是领导不干理论的计算工作而是负责整体把关,node属于就是worker节点,承受指令干活的。
1、master节点包含五个大部分:
(1)kubectl:在cmd命令行操作指令的都是这个,属于是输出kubectl命令的入口
都有啥命令呢:

第一个命令

kubectl --help而后就会显示都有啥命令如下:Basic Commands (Beginner):  create        Create a resource from a file or from stdin.  expose        Take a replication controller, service, deployment or pod and expose it as a new Kubernetes Service  run           Run a particular image on the cluster  set           Set specific features on objectsBasic Commands (Intermediate):  explain       Documentation of resources  get           Display one or many resources  edit          Edit a resource on the server  delete        Delete resources by filenames, stdin, resources and names, or by resources and label selectorDeploy Commands:  rollout       Manage the rollout of a resource  scale         Set a new size for a Deployment, ReplicaSet or Replication Controller  autoscale     Auto-scale a Deployment, ReplicaSet, or ReplicationControllerCluster Management Commands:  certificate   Modify certificate resources.  cluster-info  Display cluster info  top           Display Resource (CPU/Memory/Storage) usage.  cordon        Mark node as unschedulable  uncordon      Mark node as schedulable  drain         Drain node in preparation for maintenance  taint         Update the taints on one or more nodesTroubleshooting and Debugging Commands:  describe      Show details of a specific resource or group of resources  logs          Print the logs for a container in a pod  attach        Attach to a running container  exec          Execute a command in a container  port-forward  Forward one or more local ports to a pod  proxy         Run a proxy to the Kubernetes API server  cp            Copy files and directories to and from containers.  auth          Inspect authorizationAdvanced Commands:  diff          Diff live version against would-be applied version  apply         Apply a configuration to a resource by filename or stdin  patch         Update field(s) of a resource using strategic merge patch  replace       Replace a resource by filename or stdin  wait          Experimental: Wait for a specific condition on one or many resources.  convert       Convert config files between different API versions  kustomize     Build a kustomization target from a directory or a remote url.Settings Commands:  label         Update the labels on a resource  annotate      Update the annotations on a resource  completion    Output shell completion code for the specified shell (bash or zsh)Other Commands:  alpha         Commands for features in alpha  api-resources Print the supported API resources on the server  api-versions  Print the supported API versions on the server, in the form of "group/version"  config        Modify kubeconfig files  plugin        Provides utilities for interacting with plugins.  version       Print the client and server version information

一样一样来,先看最简略的-------比方查看的命令:

1.1 查问集群中的所有namespacekubectl get namespaces
1.2 查看所有podkubectl get po -A

(2)Api-Server:
简洁的说就是 外部内部都是它交互,具备验证和受权,只有它能和etcd交互,属于是matser的大脑
如果master是领导,那么apiserver就是老板的大脑,这个属于是k8s裸露给内部接口的组件,只有它能和etcd组件交互,所有对于资源的操作,全副通过它来调配,也能够了解为,依据这个名字,这个k8s属于一个server,而后客户端想操作k8s这个server就是http去调用接口么,后续逻辑就是外部解决了,而后Api-Server有很多机制包含:认证、受权、访问控制、api注册、发现
(3)controller-manager:k8s集群外部的所有controller的管理员,