Author: Peng Jingtian
The node nodes of Kubernetes are composed of Kubelet, Kube-proxy, flannel, dockerd four components, this paper mainly analyzes the functions and principles of kube-proxy components. Pod is the smallest unit of resource allocation in kubernetes and the smallest entity to perform tasks.
Each pod ha
Outline:
? How to discover services in Kubernetes
? How to discover the services provided by pod
? How to use service discovery Services
? How to use the Kube-dns discovery service
? Kube-dns principle
? Composition
? Domain name format
? Configuration
Note: this share is based on the
Outline:
How to discover services in KubernetesHow to discover how pod-provided services use the Service Discovery service to use the Kube-dns discovery service
Kube-dns principleCompose domain name format configuration
Note: This share is based on the Kubernetes 1.2 version.
Let's start with a simple example. 1. How to discover service in
Body in the Plugin/cmd/kube-scheduler/app/options.go file, Schedulerserver defines the context and parameters required to run a scheduler
Schedulerserver has all "context" and params needed to run a Scheduler
{
componentconfig. Kubeschedulerconfiguration//Master is the ' address ' of the
kubernetes API server (Overrides any
//value in Kubeco Nfig).
Master string
//Kubecon
Container Network Instance
3 port settings in the service
These port concepts are easily confusing, such as creating the following service:
APIVERSION:V1
kind:service
metadata:
Labels:
name:app1
name:app1 namespace:default
Spec:
type:nodeport
ports:
-
Port
The port that's exposed on the service ' s cluster IP (virsual IP). The port is the service port which was accessed by others with cluster IP.
That is, the port here indicates that the service is exposed to ports on the
3 port settings in a container network instance serviceThe concepts of these ports are easily confusing, such as creating a service like this:[Plain]View PlainCopy
Apiversion:v1
Kind:service
Metadata
Labels
Name:app1
Name:app1
Namespace:default
Spec
Type:nodeport
Ports
-
targetport:8080
Nodeport:30062
Selector
Name:app1
PortThe port, the service is exposed on the service ' s cluster IP (virsual IP). Port is the service port wh
Kube-dns compositionKube-dns can solve the service discovery problem, k8s registers the service name as a domain name into Kube-dns, and can access the services it provides through the name of the service.Kube-dns of four components: ETCD, which is used to save DNS rules. kube2sky, the role is to write DNS rules. skydns, provides DNS resolution services. healthz, provides health check function. whi
After a lapse of years, and began to play csdn.
the service in k8s is a virtual concept, completely by Kube-proxy implementation
for each service you create, you need to define three variables: Clusterip port targetport nodeport
which
Clusterip + port is used for internal pod Access service and is then assigned
Targetport is the port of the container.
Nodeport is the back-end pod for the external Access service, and can be accessed by any node-nodepo
relationship between the person and the Authority.2. Kubernetes's certification AuthorityAll operations of the Kubernetes cluster are basically done through the Kube-apiserver component, which provides HTTP restful APIs for intra-and outside-cluster client calls. It is important to note that the authentication authorization process only exists in the API in the form of HTTPS. That is, if the client uses HT
As we all know, kubernetes (k8s) is used for the management of Docker cluster, the recent period of time has been tossing the environment, here to write a blog, to help like me, small white, avoid detours.
First, the environment
Cluster environment
Role
IP Address
Version number
Docker version
System version
Master
192.63.63.1/24
v1.9.1
17.12.0-ce
Centos7.1
Node1
192.63.63.10/24
Detailed guide for manual installation and deployment of Kubernetes on Ubuntu, ubuntukubernetes
Background
Two Ubuntu16.04 servers: 192.168.56.160 and 192.168.56.161.
Kubernetes version: 1.5.5
Docker version: 1.12.6
Etcd version: 2.2.1
Flannel version: 0.5.6
Among them, 160 servers are both master nodes of Kubernetes and node nodes. 161 servers are only node node
Platform Environment: Centos 7.0First, the architecture modeSecond, Core ServicesMaster1) ETCD ServiceETCD is a highly available key-value storage system that Kubernetes uses to store the state of individual resources, enabling restful APIs. The ETCD service acts as the primary database for the Kubernetes cluster and needs to be installed and started before installing K
on kubernetes, minion1, and minion2,
[root@kubernetes kubernetes]# mkdir -p /opt/kubernetes/bin[root@kubernetes kubernetes]# tar xf kubernetes.tar.gz[root@kubernetes
Once again, the architecture is clear: three virtual machine CentOS 7.4 systems, Docker 17, IP 10.10.90.105 to 107, 105-bit master, and the next master-related components installed on this machine.The ETCD cluster is 3 units, which are reused for each of the 3 virtual machines.As the core of k8s, the master node consists of three components, namely:Three components:kube-apiserverkube-schedulerkube-controller-managerThis three components are closely linked1. Create a TLS certificateThese certific
This article is based on the Kubernetes 1.5.2 version to write the configuration method
When the kubernetes version is greater than or equal to 1.2, the external network (that is, the network within the K8s cluster) accesses the cluster IP by:Change Master's/etc/kubernetes/proxy, kube_proxy_args= "" to Kube_proxy_args= "–proxy-mode=userspace"Restart the
Kube-scheduler Component Source Reading notes
Before I start, let's talk about the way I read the project source code for the Go language. Reading other people's frame code is often a painful thing to read, especially the go (because of the way the interface is implemented, and so on). This is how I read, first find the relevant components of the Main method, and then go down one layer of the rationale, and finally do the general idea of finishing.
N
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.