📜 ⬆️ ⬇️

Kubernetes 1.9: a review of major innovations



The next release of the system Kubernetes, 1.9, should happen this week. According to the current plan , it will happen today (December 13). We already know about the main innovations that this issue will bring: just like last time , there are really a lot of them. We present an overview of the most significant changes that come to Kubernetes with the upcoming release of 1.9.

When writing this article were used:
')

... and, of course, endless issues and pull requests in the project's GitHub repositories.

API


Redesign Event API


The event API architecture (and the EventRecorder library) implements changes aimed at improving in two ways:

  1. Reduce the impact of events on overall cluster performance .
  2. To make the Event object more structured in order to simplify further work with it (“the first and necessary step for being able to automate its analysis”).

Among the problems solved by these changes:


Comparison of old and new Event objects:



In detail, all this is described in design-proposals: events-redesign . The current status is alpha version.

Admission webhooks


A beta version of a mechanism called admission webhooks has been added that allows you to modify and / or accept and reject API requests . It refers to the admission control phase and is triggered at the last request processing steps before they are saved to the database (etcd). At their core, these webhooks are similar to initializers (we wrote about them in the translation article “ What happens in Kubernetes when starting the kubectl run? Part 1 ”) , however:


An example of using admission webhooks from documentation is to check one object field and set a value for its other field. Another example is the automatic addition of a service container (for example, performing a backup) according to the annotation of the sub. For example, we have a sub under MySQL, with one container (in which MySQL itself), and this pod has a special annotation. When we create a request, the request comes to the Kubernetes API, which sends the request to our application via admission webhook , and the application sees the request, sees what is created under, sees its special annotation and does just rewrite - it adds to the second container.

A detailed description of admission webhooks published here .

Workload API


Workload API was introduced in the last Kubernetes release and combined the workload-related interfaces: DaemonSet , Deployment , ReplicaSet , StatefulSet . For them, a separate API group called apps was allocated, and with the release of K8s 1.9, all these changes received a stable status .

The main changes in the Workload API, presented in the releases Kubernetes 1.8 and 1.9, are summarized in the project documentation .

Other



Storage


Out-of-Tree Volume Plugins (CSI)


The available volume plug-ins are included in Kubernetes: they are called “in-tree”, because all the code is included in the main project repository, and in compiled form they are distributed as part of the K8s binaries. This approach has an obvious disadvantage: the support of third-party repositories by their manufacturers / developers depends on the release cycles of Kubernetes (besides, all the source code must be Open Source). In part, this problem is solved by the Flexvolume plugin, but this mechanism does not guarantee backward compatibility and (when installing the driver) requires deploying its files to specific locations on nodes and wizards.

The new approach is called Out-of-Tree CSI Volume Plugins (CSI is the Container Storage Interface, which defines how container orchestration systems can use third-party storage) . It is designed to implement a full-fledged API in Kubernetes, which allows you to:


The authors proposed the following recommended mechanism for deploying CSI drivers in Kubernetes:



The explanations for this scheme and the details of the project as a whole are published in this document . Implementation status in Kubernetes 1.9 - alpha version.

Running mount inside the deck


The feature called Containerized mounts introduces to Kubernetes the ability to run mount utilities on the sub, and not on the host machine . Thus, the host system can remain a minimal GNU / Linux distribution without third-party software: to create Ceph RBD ( /usr/bin/rbd ), mount GlusterFS ( mount.glusterfs ), etc., and all utilities for working with volumes (operations provision / delete, attach / detach, mount / unmount) are placed in the slots.

Details about this feature are published in design-proposals: containerized-mounter-pod . The current status is alpha version.

Resizing volumes


Basic support for the resize operation for existing PV ( PersistentVolume ) appeared in Kubernetes 1.8. By 1.9, it still did not reach the beta version, however, significant progress is evident: added support for resizing for file systems, and with it for GCE, EBS, Cinder, and also Ceph RBD volumes. A beta version is expected for release 1.10.

Other



Network


IPv6 support


Implemented basic IPv6 support, providing "all Kubernetes capabilities on an IPv6 network instead of IPv4." At the moment, this implementation is in the alpha version and includes:


Other



Other components and changes


Scheduler


The cluster resource release mechanism ( pod preemption ) has been improved thanks to the support of PodDisruptionBudget and nominated pods . In addition, the scheduler added support for a new type of queue, based on priorities (the first will be scheduled pods with the highest priority).

When using hostPort , the pod has the opportunity to listen to the same port on different IP addresses.

Authentication and Security


An important innovation from SIG Auth is ClusterRole Aggregation for the ability to add permissions to existing ones, i.e. roles built into RBAC ( admin , edit , view ).

You can also note that:


CLI


The feature name kubectl diff speaks for itself: this is a new command that allows you to view the differences between the locally described Kubernetes object and the current state of the real object (in the cluster). The current status is alpha version.

The option --etcd-upgrade added to kubeadm upgrade apply , which performs an upgrade to etcd in sub-versions to a version that is officially supported by the target release Kubernetes (3.1.10 in the case of K8s 1.9).

Kubeadm has added support for Kubelet Dynamic Configuration , which means that it is possible to roll out kubelet configurations to a working cluster (the feature itself first appeared in the previous version of Kubernetes and retains the status of the alpha version with the prospect of increasing to beta in K8s 1.10).

Windows



Openstack


Improved integration with the cloud platform:


Other changes



Compatibility



PS


Read also in our blog:

Source: https://habr.com/ru/post/344220/


All Articles