Kubernetes enterprise-class cluster deployment

A, Kubernetes introduction and properties

1.1 What is kubernetes

Official Website: http: //www.kubernetes.io

• Kubernetes is referred K8S Google in 2014, a vessel open source cluster management system, Kubernetes.
• K8S for deploying containerized applications, extensions and management.
• K8S provides a container scheduling, resource scheduling, resilient and elastic, deployment management, service discovery and a series of functions.
• Kubernetes goal is to deploy container applications simple and efficient.

1.2 What is kubernetes

A container platform,
a service platform for micro-
portable cloud platform

1.3, kubernetes 特性

- self-healing
in the event of node failure to restart the failed container, replace and re-deploy, to ensure the desired number of copies; kill the health check fails container, and not before is not ready to handle client requests, to ensure that online services are not interrupted.
- elastically stretchable
use the command, UI or automatically based on CPU usage and rapid expansion of volume reduction application instances to ensure high availability of application service peak concurrent; resource recovery peak when traffic is low, at a minimum cost of running the service.
- Automatic Deployment and Rollback
K8S a rolling update policy update application, update a Pod, rather than delete all Pod, if a problem occurs during the update process, rolls back the changes, make sure the upgrade is not affected business.
- Service Discovery and load balancing
to provide a unified access to all container entrance (the internal IP address and a DNS name), and load balancing for multiple associated K8S container so that the user need not consider the vessel IP issues.
- confidential and configuration management
of confidential data and application configuration, without the need to expose sensitive data in the image, the sensitive data to improve security. And may be in K8S, it is convenient to use some common application storage configuration.
- storage arrangement
mounted external storage systems, whether from local storage, public clouds (such as AWS), or network storage (such as NFS, GlusterFS, Ceph) are used as part of a cluster resources, greatly improve storage flexibility.
- Batch
one-time tasks, the timing task; meet batch data processing and analysis of scenarios.

Two, kubernetes organizational structure introduced

2.1, the overall architectural components Detailed

1, FIG., There are three nodes and a master node node two nodes.
2, Master has three components:
    - Server API: provide a unified entrance K8S, providing RESTful API access method interface services.
      - Auth: authentication and authorization, to determine whether there is access
      - Etcd: database storage, storage and authentication information, K8S state, the node information
    - scheduler: cluster scheduling, assigning clusters into which node
    - controller manager: controller, to control what tasks to do, pod service management controller
  - Kubectl: management tools, direct management API Server, there will be during the authentication and authorization.
3, Node has two components:
    - kubelet: receiving K8S issued by the task management container creation, lifecycle management, a pod converted into a group of containers.
    - kube-proxy: Pod network proxy, four load balancing, the external access
      - User -> Firewall -> kube-proxy -> Business
    Pod: K8S minimum unit
      - Container: operating environment of the container, the container engine running
        - Docker

2.2, cluster management processes and core concepts

1, cluster management process

2, Kubernetes core concepts

 

Pod
  • The minimum unit of deployment
  • A set of collection of the container
  • A Pod of container shared network namespace
  • Pod is short of
the Controllers
  • ReplicaSet: to ensure that the expected number of Pod copy
  • Deployment: Stateless application deployment
  • StatefulSet: stateful application deployment
  • DaemonSet: ensure that all run the same Node Pod
  • the job: a one-time task
  • Cronjob: regular tasks
  Note: The higher-level objects, deploy and manage Pod

Service
  • Pod lost to prevent
  access policies • define a set of Pod

The Label  : label, attached to a resource for the associated objects, queries and filters

The Namespaces  : namespace, the objects logically isolation

Annotations  : Notes

 

 3, Kubernetes 部署

 

Guess you like

Origin www.cnblogs.com/xiangsikai/p/11410261.html