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 Kubernetes
Discover
Build k8s DashBoardCluster structure:
type
Host name
IP
Master
K8s_master
192.168.3.216
Node
K8s_client1
192.168.3.217
Node
K8s_client2
192.168.3.219
The following actions are performed on K8s_master: One, Mirror download [[Emailprotected]_master ~]# Docker Pull docker.io/siriuszg/ kubernetes-dashboard-amd64:v1.5.1 Trying to pull
addition, the problems encountered by these new versions may not be found on the Internet.
Kubernetes is not designed to be bound to the Google Cloud platform, but for the above reasons, to reduce unnecessary obstacles, we recommend using GCE as the runtime environment for the first attempt (although GCE is a charged environment ). By default, five GCE instances are created in the cluster STARTUP script. After the test, you must delete the instances
collection must know the addresses of all other nodes, but when a container is rearranged, its IP address changes. For example, all containers within a kubernetes share an IP address that changes after the pod is rearranged. In kubernetes, this problem can be resolved by contacting the Kubernetes service with the Mong
Before installation, the three CENTOS7 servers are banned from the firewall, and the mirror that needs to be started 2 node machines must be kept consistent, otherwise the pod will not start1 has three CENTOS7 servers: 10.1.1.170 (Master), 10.1.1.169 node1,10.1.1.171 Node22 Install NTP service on three machines to ensure all time can be synchronized#yum-y Install NTP#systemctl Start NTPD#systemctl Enable NTPD3 Installing
updates. such as our self-built computer room, the most depressed, not like some foreign public cloud so convenient, directly can download updates. How do you do it? First of all, you have to have a ladder, and then through the special Set update service, plus all_proxy, you can automatically update!
To make it easier to use Yoo-installer, I plan to do two versions, one VM version, once downloaded, directly available, and the other Docker version. Prepared by the insufficient, did not finish,
, it takes a lot of time ). To solve this problem, the Volume abstraction Action feature in Kubernetes maps the MongoDB data folder to a persistent address to avoid container failure or rescheduling.The backup nodes of the same MongoDB database must communicate with each other, even after the re-arrangement. Nodes in the same redundant backup set must know the addresses of all other nodes. However, when a container is reconfigured, its IP address chan
Management
Parallel Pod Management
Update Strategies
On Delete
Rolling Updates
Partitions
Using statefulsetsStatefulsets is valuable for applications this require one or more of the following.
Stable, unique network identifiers.
Stable, persistent storage.
Ordered, graceful deployment and scaling.
Ordered, graceful deletion and termination.
Ordered,
Kubernetes is Google open source container choreographer, very suitable for the current hot micro-service architecture, in the Container choreography field, is gradually building a dominant position. This article mainly aims at the Kubernetes service to do some analysis, first briefly introduces the basic concept.
Basic concepts
The Pod:kubernetes minimum Dispatch unit is a set of containers that can be und
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 Kubernetes 1.2 version!Let's start wi
containers, making deployment and management more flexible. A pod can contain a container or multiple related containers. 2) Replication ControllerThe Replication Controller manages a copy of the pod to ensure that a specified number of pod copies exist in the cluster. If the number of replicas in the cluster is greater than the specified number, t
Kubernetes can connect pods on different node nodes in the cluster, and by default, each pod is accessible to each other. However, in some scenarios, different pods should not be interoperable, and access control is required at this time. So how does it work?Brief introduction?? Kubernetes provides Networkpolicy feature, which supports network access control by n
Wenjun's intellect that has not only accomplished her own, but also made his husband more successful. Shisheng du fu all use "Mao ling many sickness, Shanga" to praise their love. If Sima Xiangru, such as marrying someone else, the "Phoenix seeking Huang" can be seen, bones subject the same characters.Today's theme is not Love is not poetry, we use "The" to talk about k8s basic knowledge Keywords:One target: container operation; three centers of two places; four-layer service discovery; Five
kubernetes Introduction
Kubernetes is a container cluster management system that Google Open-source in June 2014, using the Go language development, Kubernetes also called k8s.
K8s is a Borg container cluster management system inside Google, Borg has been operating on Google's mass production for 10 years.
K8s is mainly used for automated deployment, expansion
run in master, because Master has a stain) filebeat-ds-chxl6 1/1 Running 1 8m 10.244.2.37 node2 filebeat-ds-rmnxq 1/1 Running 0 8m 10.244.1.35 node1# kubectl logs myapp-ds-r47zj# kubectl expose deployment Redis--port=6379# Kubectl describe DS filebeat# Support Online rolling updates Kubectl Set Image DaemoNsets filebeat-ds filebeat=ikubernetes/filebeat:5.6.6-alpine# Kubectl explain Pod.spec hostnetwork ( Daemonset can directly share the host's network name, directly to provide services to
Kubernetes Cluster Deployment DNS ServiceIn Kubernetes each service will be assigned a virtual IP, each service under normal circumstances will not change for a long time, this is relative to the pod of the indefinite IP, the use of the cluster app is relatively stable.But the service's information injected into the pod
field by allowing you to modify the pod ordering policy.
Orderedready: The start and stop order above, the default setting.
Parallel: Tells the Statefulset controller to start or terminate all pods in parallel and not wait until the previous pod changes to running and ready or completely terminates before starting or terminating another pod.Statefulset Usage Scenarios
Stable persistent storage, that
" # 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" #
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.