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 and management of container applications, providing a set of functions such as resource scheduling, deployment management, service discovery, capacity expansion, and monitoring.
July 2015, Kubernetes v1.0 officially released, as of September 29, 2017, the latest stable version is v1.8.
The kubernetes goal is to make deployment of containerized applications simple and efficient.
Official website: Www.kubernetes.io
Kubernetes main functions:
n Data Volume
You can use data volumes to share data between containers in a pod.
n Application Health Check
The container service may be blocked from processing the request, you can set up a monitoring and checking policy to ensure the robustness of the application.
n Copy Application instance
The controller maintains the number of pod replicas, ensuring that a pod or a group of similar pods is always available.
n Elastic Scaling
Automatically scales the number of pod replicas based on set metrics (CPU utilization).
N Service Discovery
Use an environment variable or DNS service plug-in to ensure that a pod portal access address is found in the container.
n Load Balancing
A set of pod replicas allocates a private cluster IP address, and load-balanced forwarding requests to the back-end container. Other pods within the cluster can be accessed using this clusterip.
n Rolling Update
The update service is not interrupted, one pod is updated at a time, not the entire service is deleted.
N Service Choreography
Deploying services through File descriptions makes application deployment more efficient.
N Resource Monitoring
Node node component Integration Cadvisor Resource Collection tool, can summarize the whole cluster node resource data through Heapster, then store to influxdb time series database, then show by Grafana.
n provide certification and authorization
Support attribute access control (ABAC), Role access control (RBAC) authentication authorization policy.
Basic Object Concepts
Basic objects:
nPod
Pod is the smallest deployment unit, a pod consisting of one or more containers, in which containers share storage and network, running on the same Docker host.
nService
Service An application services abstraction that defines the pod logic set and the strategy for accessing this pod collection.
Service Agent Pod Collection external performance is for an access portal, assigning a cluster IP address, the request from this IP will load balanced forward in the back-end pod container.
Service through Lableselector Select a set of pod offerings.
nVolume
Data volumes that share data used by containers in the pod.
nNamespace
Namespaces assign objects logically to different namespace, can be differentiated by different projects, users, and set control strategies to achieve multiple tenants.
Namespaces are also called virtual clusters.
nlable
tags are used to differentiate objects (such as pod, Service), key/value pairs exist, and each object can have multiple labels, associating objects through labels.
higher-level abstraction based on basic objects:
nreplicaset
Next Generation Replicationcontroller. Ensure the number of pod replicas specified at any given time and provide functionality such as declarative updates.
The only difference between RC and RS is that lableselector support is different, RS supports a new collection based label, and RC only supports an equation based label.
NDeployment
Deployment is a higher-level API object that manages replicasets and Pod, and provides features such as declarative updates.
The official recommendation to use deployment to manage replicasets, rather than directly using replicasets, means that you may never need to directly manipulate Replicaset objects.
nstatefulset
Statefulset for persistent applications, with unique network identifiers (IP), persistent storage, ordered deployment, extension, deletion, and rolling updates.
ndaemonset
Daemonset ensure that all (or some) nodes run the same pod. When a node joins the Kubernetes cluster, the pod is dispatched to the node to run and the pod of the Daemonset is removed when the node is removed from the cluster. Deleting daemonset will clean up all of its created pods.
nJob
One-time task, after the completion of the pod destroyed, no longer restart the new container. The task can also be scheduled to run.
system architecture and component functions
system architecture and component functions
Master component:
N kube-apiserver