Read configuration to create a cluster
Shows how Master daemon works to achieve the above features:API Server (Kube-apiserver)API server provides a RESTful API based on HTTP or HTTPS, which is the center of the kubernetes component, such as Kubectl, the scheduler, the replication controller, and ETCD data storage , and Kubelet and Kube-proxy running on
use a flat address space without dynamically allocating ports. Instead, you can choose any port that suits your needs. To achieve this, it assigns an IP address to each Pod.
Kubernetes provides Service abstraction, which provides a stable IP address and DNS name to correspond to a group of dynamic pods, for example, a Pod of A microservice. This Pod group is defined by the Label selector, because any Pod group can be specified. When a container runni
From my space turn over, space address http://user.qzone.qq.com/29185807/blog/1458208552 Source version for v1.1.1 stable versionStart file K8s.io/kubernetes/cmd/kube-apiserver/apiserver.go from function mainWe enter the Server.go in the K8s.io/kubernetes/cmd/kube-apiserver/app catalogue.We see a lot of parameters in a
allow mirroring to be pulled from the registry.[[email protected] ~]# vim/etc/sysconfig/docker#/etc/sysconfig/docker# Modify These options if you want to change the WA Y the Docker daemon runsoptions= '--selinux-enabled--log-driver=journald--signature-verification=false ' If [-Z ' ${ Docker_cert_path} "]; Then docker_cert_path=/etc/dockerfioptions= '--insecure-registry registry:5000 'Set up boot and turn on services[[email protected] ~]# chkconfig Docker on[[email protected] ~]# service Dock
Turn from my own space, http://user.qzone.qq.com/29185807/blog/145872228
Continue to connect the Kube-apiserver analysis (2)
In the previous article, we analyzed the registration of storage. Below is an analysis of how storage is converted into restful format.
Let's start with the k8s.io\kubernetes\pkg\master\master.go.
In function func (M *master) init (c *config)
We saw Api_v1 's installrest.
Trace it i
CIDR block on 167 is 172.17.4.13/24.168 is 172.17.14.0/24, and the IP addresses of the docker containers created later are in the two network segments respectively.Then execute
Flanneld>/usr/local/kubernete_test/logs/flanneld. log 2> 1 Run the following command on each machine:
Mk-docker-opts.sh-ISource/run/flannel/subnet. envRm/var/run/docker. pidIfconfig docker0 $ {FLANNEL_SUBNET}Restart docker
Service docker restartIn this way, the network of containers on the two machines is connected, and
, and can be used for ping operations.
Cluster IP: That is, the service IP, this IP is only used in kubernetes to implement the service interactive communication, is essentially just a few dnat rules on iptables. By default, this IP only provides access to the service port and is not ping.
As an example of a clustered DNS service, the associated core iptables is as follows:These iptables are generated by
is responsible for "backstage". Each resource generally has a controller, and controller manager is responsible for managing those controllers. For example, we create a pod through Apiserver, and when the pod is created, Apiserver's task is done. And the next guarantee that pod status is always the same as we expected the responsibility of the Controller manager to ensure. Etcd. ETCD is a highly available key-value storage system that Kubernetes u
" # Partial flannel configuration, see roles/flannel/templates/kube-flannel.yaml.j2flannel_backend= "Vxlan" # service CIDR, Deployment Road is unreachable, deployed after cluster using ip:port up to Service_cidr= "10.68.0.0/16" # POD segment (Cluster CIDR), Deployment forward unreachable, * * After Deployment * * Routing up to Cluster_cidr= "172.21.0.0/16" # Service port range (Nodeport range) node_port_range= "20000-40000" #
ETCD and creates an agent based on the service information. When a customer pod accesses another pod, the access request is forwarded by the native proxy.Borrowing a net diagram to express the relationship between functional components:Two. Basic Concept nodeNode is a working host in the Kubernetes cluster relative to master, and is also known as Minion in earlier versions. Node can be a physical host, or it can be a virtual machine (VM). The service
/binding API in Kubernetes, Scheduler is responsible for pods allocations on each node. Scheduler is plug-in, Kubernetes can support user-defined scheduler in the future.4. Kubernetes Controller Manager ServerController Manager Server is responsible for all other functions, such as the endpoints controller responsible for creating and updating endpoints objects.
is created, the Proxy obtains the configuration information of Services and Endpoints from etcd (or from file ), then, start a Proxy process on Minion Based on the configuration information and listen to the corresponding service port. When an external request occurs, the Proxy will distribute the request to the correct backend container for Processing Based on Load Balancer.
Therefore, the Proxy not only solves the conflict between the same Service port on the same host machine, but also provi
kubernetes cluster Installation DeploymentKubernetes Cluster Components:-master node-Etcd a highly available k/v key value to the storage and service discovery system-Kube-apiserver provides API calls to Kubernetes clusters-Kube-controller-manager ensure Cluster service-Kube
Kubernetes container cluster management system basic explanation, kubernetes Management SystemKubernetes Overview
Kubernetes is open-source by GoogleContainer Cluster Management SystemIs an open-source version of Google's large-scale container management technology Brog, which includes the following features:
Container-based application deployment, maintenance,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.