One hundred years of repair with the ship crossing, in March repair a version, congratulations Kubernetes successful emperor.

It has been updated quarterly since 1.0GA in 2015, and this year’s third version, 1.12, was released on September 27.

Whether you are a developer using Kubernetes or an administrator in charge of operating clusters, you should be aware of the new features and bug fixes in Kubernetes 1.12.

Kubernetes 1.12 contains 38 features.

https://github.com/kubernetes/features/milestone/11

Now let’s take a look at some of the new highlights.

I. Kubelet certificate rotation

Kubelet certificate rotation is now in beta. This feature automatically renewals the key and kubelet API server’s certificate when the current certificate expires. Before the official 1.12 documentation is released, you can read the beta documentation for this feature here:

https://github.com/kubernetes/website/blob/release-1.12/content/en/docs/reference/command-line-tools-reference/kubelet-t ls-bootstrapping.md#kubelet-configuration

Network policy: CIDR selector and egress rule

Two former beta features are now stable: one is the ipBlock selector, which allows ingress/egress rules to be specified based on network addresses in CIDR notation. The egress rule is specified to filter the traffic leaving the POD. The following example illustrates the use of both features:

apiVersion: networking.k8s.io/v1

kind: NetworkPolicy

metadata:

  name: network-policy

  namespace: default

spec:

  podSelector:

    matchLabels:

      role: app

  policyTypes:

  – Egress

  egress:

  – to:

    – ipBlock:

Cidr: 10.0.0.0/24

(…).

Egress and ipBlock were previously beta functions and are already in the official Kubernetes network policy documentation:

https://kubernetes.io/docs/concepts/services-networking/network-policies/

Mount namespace propagation

Mount namespace propagation, that is, mount volume Rshared so that any mount within the container is reflected in the root (= host) mount namespace, is now stable. You can read more about this feature in the Kubernetes volume documentation:

https://kubernetes.io/docs/concepts/storage/volumes/#mount-propagation

Create Taint Nodes according to the condition

In Kubernets 1.8, this feature was an early alpha release and has now been upgraded to beta. With its Featureflag enabled, the node controller can create taints based on node conditions and have the scheduler filter nodes based on taints rather than conditions. The official document is here:

https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/#taint-nodes-by-condition

Five, with a custom index of the horizontal POD automatic expansion device

While support for custom metrics has always been in beta status in the HPA, version 1.12 adds various enhancements, such as the ability to select metrics based on available tags in the monitoring pipeline. If you are interested in an application-level metric auto-tuning POD based on monitoring systems such as Prometheus, Sysdig, or Datadog, I recommend looking at the design of external metrics in HPA:

https://github.com/kubernetes/community/blob/master/contributors/design-proposals/autoscaling/hpa-external-metrics.md

Six, RuntimeClass

RuntimeClass is a new cluster-wide resource that “represents container runtime properties to the control plane.” In other words, it allows the user to select and configure (per pod) a container-specific runtime (such as Docker, RKT, or Virtlet) by providing runtimeClass in PodSpec. This feature is in its early alpha stage, but more information can be found here:

https://github.com/kubernetes/website/blob/release-1.12/content/en/docs/concepts/containers/runtime-class.md

7. Resource quota priority

Resource quotas allow administrators to limit resource consumption in namespaces. This feature is especially useful when multiple tenants (users/teams) share available computing and storage resources in a cluster. The resource quota priority of the beta allows administrators to adjust the allocation of resources within the namespace based on the pod’s PriorityClass. You can learn more details here:

https://kubernetes.io/docs/concepts/policy/resource-quotas/#resource-quota-per-priorityclass

8. Volume Snapshot

One of the most exciting storage features in Kubernetes 1.12 is persistent volume snapshots (although it is still in alpha). This feature allows users to create and restore snapshots at specific points in time supported by any CSI storage provider. This update adds three new API resources as part of this functionality:

  • VolumeSnapshotClass defines how to configure the snapshot of an existing volume.

  • VolumeSnapshotContent Indicates an existing snapshot.

  • VolumeSnapshot allows the user to request a new snapshot of a persistent volume

Here’s an example:

apiVersion: snapshot.storage.k8s.io/v1alpha1

kind: VolumeSnapshot

metadata:

  name: new-snapshot-test

spec:

  snapshotClassName: csi-hostpath-snapclass

  source:

    name: pvc-test

    kind: PersistentVolumeClaim

For more information, see the 1.12 Documentation branch on Github:

https://github.com/kubernetes/website/blob/release-1.12/content/en/docs/concepts/storage/volume-snapshots.md

 

Dynamic configuration of topology awareness

Another storage-related feature is topology-aware dynamic configuration. This feature was first introduced in Kubernetes 1.11 and was promoted to beta status in 1.12. It addresses some of the limitations of dynamically configuring volumes in a cluster that spans multiple zones, where a single-zone storage back end is not globally accessible from all nodes.

Enhanced support for Azure

In Kubernetes 1.12, there are two enhancements to running Kubernetes in Azure:

  • Automatic Cluster scaling

    Azure’s cluster autoscaling support has been upgraded to stable. This will allow automatic scaling of the number of Azure nodes in the Kubernetes cluster based on global resources.

  • Azure availability area support

    Kubernetes 1.12 adds alpha support for Azure Availability Zones (AZ). Node will add tags of the area of the available failure – domain. Beta. Kubernetes. IO/zone = < region > – < AZ >, and add topological perception to Azure hosting disk storage class configuration.

11. More

Kubernetes 1.12 contains a number of bug fixes and internal component improvements. This update to Kubernetes clearly focuses on stabilizing the core and maturing existing beta features. Another was to speed up the release by adding more automated tests to the project CI pipeline, including arm, ARM64, PPC64, S390X, and CI E2E conformance tests for the Windows platform for the project test tools.

For a complete list of changes to Kubernetes 1.12, of course, read the release notes:

https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.12.md

The article was reprinted from RancherLabs: original link