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
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
https://rominirani.com/ Tutorial-getting-started-with-kubernetes-on-your-windows-laptop-with-minikube-3269b54a226#.d9lmuvzf2
This article's Considerations:
1, as of 2017.01.20, window kubernetes is still experimental, there are a variety of unpredictable bugs, if you encounter bugs, please go to kubernetes GitHub search Issues to find solutions (issues
Kubernetes API Server FeaturesThe core function of Kubernete API server is to provide an HTTP rest interface for kubernetes, deleting, changing, checking, and watch for various resource objects (such as Node,pod,service, etc.).The API server is the central hub for data interaction and communication between the various functional modules in the cluster, in addition to the following features:
API Por
From Mesos to KubernetesThe previous scheduling framework was based on Mesos self-research. The language used is Python. Run for about two years, and has been relatively stable. But as the business grows, the problems of the existing framework are gradually exposed.
Scheduling speed encountered bottlenecks, affecting the deployment of large business speed.
There is no good support for stateful services.
There are two solutions to this problem, one for improved refactoring of ex
corresponding.Modify its configuration file/etc/sysconfig/flanneld content as follows:# Flanneld configuration options # ETCD URL location. Point the server where Etcd runsflannel_etcd_endpoints="https://10.10.90.105:2379,https://10.10.90.106:2379,https://10.10.90.107:2379"# ETCD config key. This is the configuration key, which flannel queries# for address range Assignment#flannel_etcd_prefix="/atomic.io/network"Flannel_etcd_prefix="/kube-centos/network"# Any additional options and want to pass
Use Kubernetes step by stepWhy Docker and Kubernetes?
Containers allow us to build, publish, and run distributed applications. They free applications from machine restrictions and allow us to create a complex application in a certain way.
Writing applications using containers can bring development and QA closer to the production environment (if you try to do so ). By doing so, you can publish changes faster
Kubernetes is a docker-based, open-source container cluster management system initiated and maintained by the Google team that not only supports common cloud platforms, but also supports internal data centers.Built on top of Docker, Kubernetes can build a container scheduling service that allows users to manage cloud container clusters through kubernetes clusters
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 Kubernetes Master on 10.1.1.17
Note: The following operations are based on the CENTOS7 system.Installing AnsibleAnsilbe can be installed via Yum or Pip, and because Kubernetes-ansible uses the password, it needs to be installed Sshpass:pip install ansiblewget http://sourceforge.net/projects/sshpass/files/latest/downloadtar zxvf downloadcd sshpass-1.05./configure make make installConfigure Kubernetes-ansible# git clone https://github.co
The Cluster Lifecycle layer adds self-hosted functionality to Kubeadm, which means that Kubernetes can be run on Kubernetes, which is bootstrap. Bootstrap is considered to be a system of "elegance" of a embodiment, in fact, Kubernetes in the early attempt to bootstrap, now Kubeadm directly add this feature, is undoubtedly a step closer. In addition, the KUBEADM c
Build kubernetes cluster, there is a default dashboard, but this dashboard is relatively humble, can not be customized display. So we're going to use GRAFANA+HEAPSTER+INFLUXDB to build an integrated monitoring platform.What's the first thing? Get the source code from Https://github.com/kubernetes/heapster, in the Heapster/deploy/kube-config/influxdb folder will all Yaml
://127.0.0.1:8118" "NO_PROXY=LOCALHOST,172.16.0.0/16,127.0.0.1,10.244.0.0/16"
Start Docker
Systemctl daemon-reload systemctl Restart Docker
1.2 installation Kubeadm, Kubelet and Kubectl
Configuring Kubernetes sources
Cat
Start installation
Yum install-y kubelet kubeadm kubectl systemctl
enable Kubelet sudo systemctl start kubelet
At this point, the software required to install on all machines has ended. the second is configured on Master 2.0 I
1, Ingress Components Introduction
Ingress solves the problem of the domain name and service after the new service is added, basically a Ingress object, which is loaded by creating and updating with Yaml.
Ingress Controller is to ingress this change to generate a nginx configuration, and then this configuration through the Kubernetes API written to the Nginx pod, and then reload.
2. genera
kubernetes Common Commands1. View class Commandskubectl cluster-info----View cluster informationkubectl-s http://localhost:8080 Get componentstatuses----View individual component informationkubectl Get PODS----List all the current podsKubectl get pods-o wide----View the running node where the pods is locatedKubectl Get pods-o yaml----View details of the pods definitionKubectl get RC----View replication Cont
First, prerequisites1, first you will have ready-made kubernetes cluster, if you have nothing now, please refer to:http://zlyang.blog.51cto.com/1196234/19510102, the proposed use ETCD cluster, the construction process please refer to:http://zlyang.blog.51cto.com/1196234/1951164Ii. Deployment of Kubernetes-dashboard[All machines: Master, Node1, Node2]1, install flannel (Flannel for Management containers Netw
CONFIGMAP parameter directly on the command line, i.e.--from-literal
Create a configuration file as a configmap by specifying the file creation--from-file=
By specifying the directory creation, all profiles under a directory are created as a configmap, --from-file=Created by the Yaml file, and the other by Kubectl directly at the command line.
Write the standard configmap Yaml file in advance, and th
Especially when creating pods, you will encounter all kinds of problems, please check the error details by the following command.Kubectl describe pod xxxxxx1. Problem phenomenon: Mirroring is always not getting downWORKAROUND: Set up a mirror source for Docker--registry-mirror=http://f2d6cb40.m.daocloud.io'2. Symptom: There is a certificate error in the error message, certificate xxxx, execute on node nodesYum Install *rhsm*-y3. Problem phenomenon: When using the Docker private library, when pro
What is the difference between Apache's Mesos and Google's kubernetes? This article comes from a question on the StackOverflow, mainly discusses the difference between Mesos and kubernetes, I believe many of us also have the question of agreeing. Kubernetes's developer Craig answered the question, while Masi also made an overview, not necessarily for the reader's reference.
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.