A complete changelog for the release notes is now hosted in a customizable
format at https://relnotes.k8s.io. Check it out and please give us your
feedback!
What’s New (Major Themes)
Kubernetes Topology Manager Moves to Beta - Align Up!
A beta feature of Kubernetes in release 1.18, the Topology Manager feature enables NUMA alignment of CPU and devices (such as SR-IOV VFs) that will allow your workload to run in an environment optimized for low-latency. Prior to the introduction of the Topology Manager, the CPU and Device Manager would make resource allocation decisions independent of each other. This could result in undesirable allocations on multi-socket systems, causing degraded performance on latency critical applications.
Serverside Apply - Beta 2
Server-side Apply was promoted to Beta in 1.16, but is now introducing a second Beta in 1.18. This new version will track and manage changes to fields of all new Kubernetes objects, allowing you to know what changed your resources and when.
Extending Ingress with and replacing a deprecated annotation with IngressClass
In Kubernetes 1.18, there are two significant additions to Ingress: A new pathType field and a new IngressClass resource. The pathType field allows specifying how paths should be matched. In addition to the default ImplementationSpecific type, there are new Exact and Prefix path types.
The IngressClass resource is used to describe a type of Ingress within a Kubernetes cluster. Ingresses can specify the class they are associated with by using a new ingressClassName field on Ingresses. This new resource and field replace the deprecated kubernetes.io/ingress.class annotation.
SIG CLI introduces kubectl debug
SIG CLI was debating the need for a debug utility for quite some time already. With the development of ephemeral containers, it became more obvious how we can support developers with tooling built on top of kubectl exec. The addition of the kubectl debugcommand (it is alpha but your feedback is more than welcome), allows developers to easily debug their Pods inside the cluster. We think this addition is invaluable. This command allows one to create a temporary container which runs next to the Pod one is trying to examine, but also attaches to the console for interactive troubleshooting.
Introducing Windows CSI support alpha for Kubernetes
With the release of Kubernetes 1.18, an alpha version of CSI Proxy for Windows is getting released. CSI proxy enables non-privileged (pre-approved) containers to perform privileged storage operations on Windows. CSI drivers can now be supported in Windows by leveraging CSI proxy.
SIG Storage made a lot of progress in the 1.18 release.
In particular, the following storage features are moving to GA in Kubernetes 1.18:
Raw Block Support: Allow volumes to be surfaced as block devices inside containers instead of just mounted filesystems.
Volume Cloning: Duplicate a PersistentVolumeClaim and underlying storage volume using the Kubernetes API via CSI.
CSIDriver Kubernetes API Object: Simplifies CSI driver discovery and allows CSI Drivers to customize Kubernetes behavior.
SIG Storage is also introducing the following new storage features as alpha in Kubernetes 1.18:
Windows CSI Support: Enabling containerized CSI node plugins in Windows via new CSIProxy
Recursive Volume Ownership OnRootMismatch Option: Add a new “OnRootMismatch” policy that can help shorten the mount time for volumes that require ownership change and have many directories and files.
Other notable announcements
SIG Network is moving IPv6 to Beta in Kubernetes 1.18, after incrementing significantly the test coverage with new CI jobs.
NodeLocal DNSCache is an add-on that runs a dnsCache pod as a daemonset to improve clusterDNS performance and reliability. The feature has been in Alpha since 1.13 release. The SIG Network is announcing the GA graduation of Node Local DNSCache #1351
Known Issues
No Known Issues Reported
Urgent Upgrade Notes
(No, really, you MUST read this before you upgrade)
kube-apiserver:
in an --encryption-provider-config config file, an explicit cacheSize: 0 parameter previously silently defaulted to caching 1000 keys. In Kubernetes 1.18, this now returns a config validation error. To disable caching, you can specify a negative cacheSize value in Kubernetes 1.18+.
The following features are unconditionally enabled and the corresponding --feature-gates flags have been removed: PodPriority, TaintNodesByCondition, ResourceQuotaScopeSelectors and ScheduleDaemonSetPods (#86210, @draveness) [SIG Apps and Scheduling]
kubelet:
--enable-cadvisor-endpoints is now disabled by default. If you need access to the cAdvisor v1 Json API please enable it explicitly in the kubelet command line. Please note that this flag was deprecated in 1.15 and will be removed in 1.19. (#87440, @dims) [SIG Instrumentation, Node and Testing]
Promote CSIMigrationOpenStack to Beta (off by default since it requires installation of the OpenStack Cinder CSI Driver. The in-tree AWS OpenStack Cinder driver "kubernetes.io/cinder" was deprecated in 1.16 and will be removed in 1.20. Users should enable CSIMigration + CSIMigrationOpenStack features and install the OpenStack Cinder CSI Driver (https://github.com/kubernetes-sigs/cloud-provider-openstack) to avoid disruption to existing Pod and PVC objects at that time. Users should start using the OpenStack Cinder CSI Driver directly for any new volumes. (#85637, @dims) [SIG Cloud Provider]
kubectl:
kubectl and k8s.io/client-go no longer default to a server address of http://localhost:8080. If you own one of these legacy clusters, you are strongly encouraged to secure your server. If you cannot secure your server, you can set the $KUBERNETES_MASTER environment variable to http://localhost:8080 to continue defaulting the server address. kubectl users can also set the server address using the --server flag, or in a kubeconfig file specified via --kubeconfig or $KUBECONFIG. (#86173, @soltysh) [SIG API Machinery, CLI and Testing]
kubectl run has removed the previously deprecated generators, along with flags unrelated to creating pods. kubectl run now only creates pods. See specific kubectl create subcommands to create objects other than pods.
(#87077, @soltysh) [SIG Architecture, CLI and Testing]
The deprecated command kubectl rolling-update has been removed (#88057, @julianvmodesto) [SIG Architecture, CLI and Testing]
client-go:
Signatures on methods in generated clientsets, dynamic, metadata, and scale clients have been modified to accept context.Context as a first argument. Signatures of Create, Update, and Patch methods have been updated to accept CreateOptions, UpdateOptions and PatchOptions respectively. Signatures of Delete and DeleteCollection methods now accept DeleteOptions by value instead of by reference. Generated clientsets with the previous interface have been added in new "deprecated" packages to allow incremental migration to the new APIs. The deprecated packages will be removed in the 1.21 release. A tool is available at http://sigs.k8s.io/clientgofix to rewrite method invocations to the new signatures.
The following deprecated metrics are removed, please convert to the corresponding metrics:
The following replacement metrics are available from v1.14.0:
The following replacement metrics are available from v1.15.0:
apiserver_storage_transformation_failures_total -> apiserver_storage_transformation_operations_total (#76496, @danielqsj) [SIG API Machinery, Cluster Lifecycle, Instrumentation, Network, Node and Scheduling]
Changes by Kind
Deprecation
kube-apiserver:
the following deprecated APIs can no longer be served:
All resources under apps/v1beta1 and apps/v1beta2 - use apps/v1 instead
daemonsets, deployments, replicasets resources under extensions/v1beta1 - use apps/v1 instead
networkpolicies resources under extensions/v1beta1 - use networking.k8s.io/v1 instead
podsecuritypolicies resources under extensions/v1beta1 - use policy/v1beta1 instead (#85903, @liggitt) [SIG API Machinery, Apps, Cluster Lifecycle, Instrumentation and Testing]
kube-controller-manager:
Azure service annotation service.beta.kubernetes.io/azure-load-balancer-disable-tcp-reset has been deprecated. Its support would be removed in a future release. (#88462, @feiskyer) [SIG Cloud Provider]
kubelet:
The StreamingProxyRedirects feature and --redirect-container-streaming flag are deprecated, and will be removed in a future release. The default behavior (proxy streaming requests through the kubelet) will be the only supported option. If you are setting --redirect-container-streaming=true, then you must migrate off this configuration. The flag will no longer be able to be enabled starting in v1.20. If you are not setting the flag, no action is necessary. (#88290, @tallclair) [SIG API Machinery and Node]
resource metrics endpoint /metrics/resource/v1alpha1 as well as all metrics under this endpoint have been deprecated. Please convert to the following metrics emitted by endpoint /metrics/resource:
- scrape_error --> scrape_error
- node_cpu_usage_seconds_total --> node_cpu_usage_seconds
- node_memory_working_set_bytes --> node_memory_working_set_bytes
- container_cpu_usage_seconds_total --> container_cpu_usage_seconds
- container_memory_working_set_bytes --> container_memory_working_set_bytes
- scrape_error --> scrape_error
(#86282, @RainbowMango) [SIG Node]
In a future release, kubelet will no longer create the CSI NodePublishVolume target directory, in accordance with the CSI specification. CSI drivers may need to be updated accordingly to properly create and process the target path. (#75535) [SIG Storage]
kube-proxy:
--healthz-port and --metrics-port flags are deprecated, please use --healthz-bind-address and --metrics-bind-address instead (#88512, @SataQiu) [SIG Network]
a new EndpointSliceProxying feature gate has been added to control the use of EndpointSlices in kube-proxy. The EndpointSlice feature gate that used to control this behavior no longer affects kube-proxy. This feature has been disabled by default. (#86137, @robscott)
kubeadm:
command line option "kubelet-version" for kubeadm upgrade node has been deprecated and will be removed in a future release. (#87942, @SataQiu) [SIG Cluster Lifecycle]
deprecate the usage of the experimental flag '--use-api' under the 'kubeadm alpha certs renew' command. (#88827, @neolit123) [SIG Cluster Lifecycle]
kube-dns is deprecated and will not be supported in a future version (#86574, @SataQiu) [SIG Cluster Lifecycle]
the ClusterStatus struct present in the kubeadm-config ConfigMap is deprecated and will be removed in a future version. It is going to be maintained by kubeadm until it gets removed. The same information can be found on etcd and kube-apiserver pod annotations, kubeadm.kubernetes.io/etcd.advertise-client-urls and kubeadm.kubernetes.io/kube-apiserver.advertise-address.endpoint respectively. (#87656, @ereslibre) [SIG Cluster Lifecycle]
kubectl:
the boolean and unset values for the --dry-run flag are deprecated and a value --dry-run=server|client|none will be required in a future version. (#87580, @julianvmodesto) [SIG CLI]
kubectl apply --server-dry-run is deprecated and replaced with --dry-run=server (#87580, @julianvmodesto) [SIG CLI]
The scheduling_duration_seconds summary metric is deprecated (#86586, @xiaoanyunfei) [SIG Scheduling]
The scheduling_algorithm_predicate_evaluation_seconds and
scheduling_algorithm_priority_evaluation_seconds metrics are deprecated, replaced by framework_extension_point_duration_seconds[extension_point="Filter"] and framework_extension_point_duration_seconds[extension_point="Score"]. (#86584, @xiaoanyunfei) [SIG Scheduling]
AlwaysCheckAllPredicates is deprecated in scheduler Policy API. (#86369, @Huang-Wei) [SIG Scheduling]
Other deprecations:
The k8s.io/node-api component is no longer updated. Instead, use the RuntimeClass types located within k8s.io/api, and the generated clients located within k8s.io/client-go (#87503, @liggitt) [SIG Node and Release]
Removed the 'client' label from apiserver_request_total. (#87669, @logicalhan) [SIG API Machinery and Instrumentation]
API Change
New API types/versions:
A new IngressClass resource has been added to enable better Ingress configuration. (#88509, @robscott) [SIG API Machinery, Apps, CLI, Network, Node and Testing]
The CSIDriver API has graduated to storage.k8s.io/v1, and is now available for use. (#84814, @huffmanca) [SIG Storage]
New API fields:
autoscaling/v2beta2 HorizontalPodAutoscaler added a spec.behavior field that allows scale behavior to be configured. Behaviors are specified separately for scaling up and down. In each direction a stabilization window can be specified as well as a list of policies and how to select amongst them. Policies can limit the absolute number of pods added or removed, or the percentage of pods added or removed. (#74525, @gliush) [SIG API Machinery, Apps, Autoscaling and CLI]
Ingress:
spec.ingressClassName replaces the deprecated kubernetes.io/ingress.class annotation, and allows associating an Ingress object with a particular controller.
path definitions added a pathType field to allow indicating how the specified path should be matched against incoming requests. Valid values are Exact, Prefix, and ImplementationSpecific (#88587, @cmluciano) [SIG Apps, Cluster Lifecycle and Network]
The alpha feature AnyVolumeDataSource enables PersistentVolumeClaim objects to use the spec.dataSource field to reference a custom type as a data source (#88636, @bswartz) [SIG Apps and Storage]
The alpha feature ConfigurableFSGroupPolicy enables v1 Pods to specify a spec.securityContext.fsGroupChangePolicy policy to control how file permissions are applied to volumes mounted into the pod. (#88488, @gnufied) [SIG Storage]
The alpha feature ServiceAppProtocol enables setting an appProtocol field in ServicePort and EndpointPort definitions. (#88503, @robscott) [SIG Apps and Network]
The alpha feature ImmutableEphemeralVolumes enables an immutable field in both Secret and ConfigMap objects to mark their contents as immutable. (#86377, @wojtek-t) [SIG Apps, CLI and Testing]
Other API changes:
The beta feature ServerSideApply enables tracking and managing changed fields for all new objects, which means there will be managedFields in metadata with the list of managers and their owned fields.
The alpha feature ServiceAccountIssuerDiscovery enables publishing OIDC discovery information and service account token verification keys at /.well-known/openid-configuration and /openid/v1/jwks endpoints by API servers configured to issue service account tokens. (#80724, @cceckman) [SIG API Machinery, Auth, Cluster Lifecycle and Testing]
CustomResourceDefinition schemas that use x-kubernetes-list-map-keys to specify properties that uniquely identify list items must make those properties required or have a default value, to ensure those properties are present for all list items. See https://kubernetes.io/docs/reference/using-api/api-concepts/#merge-strategy for details. (#88076, @eloyekunle) [SIG API Machinery and Testing]
CustomResourceDefinition schemas that use x-kubernetes-list-type: map or x-kubernetes-list-type: set now enable validation that the list items in the corresponding custom resources are unique. (#84920, @sttts) [SIG API Machinery]
Configuration file changes:
kube-apiserver:
The --egress-selector-config-file configuration file now accepts an apiserver.k8s.io/v1beta1 EgressSelectorConfiguration configuration object, and has been updated to allow specifying HTTP or GRPC connections to the network proxy (#87179, @Jefftree) [SIG API Machinery, Cloud Provider and Cluster Lifecycle]
kube-scheduler:
A kubescheduler.config.k8s.io/v1alpha2 configuration file version is now accepted, with support for multiple scheduling profiles (#87628, @alculquicondor) [SIG Scheduling]
HardPodAffinityWeight moved from a top level ComponentConfig parameter to a PluginConfig parameter of InterPodAffinity Plugin in kubescheduler.config.k8s.io/v1alpha2 (#88002, @alculquicondor) [SIG Scheduling and Testing]
Kube-scheduler can run more than one scheduling profile. Given a pod, the profile is selected by using its .spec.schedulerName. (#88285, @alculquicondor) [SIG Apps, Scheduling and Testing]
Scheduler Extenders can now be configured in the v1alpha2 component config (#88768, @damemi) [SIG Release, Scheduling and Testing]
The PostFilter of scheduler framework is renamed to PreScore in kubescheduler.config.k8s.io/v1alpha2. (#87751, @skilxn-go) [SIG Scheduling and Testing]
kube-proxy:
Added kube-proxy flags --ipvs-tcp-timeout, --ipvs-tcpfin-timeout, --ipvs-udp-timeout to configure IPVS connection timeouts. (#85517, @andrewsykim) [SIG Cluster Lifecycle and Network]
Added optional --detect-local-mode flag to kube-proxy. Valid values are "ClusterCIDR" (default matching previous behavior) and "NodeCIDR" (#87748, @satyasm) [SIG Cluster Lifecycle, Network and Scheduling]
Kube-controller-manager and kube-scheduler expose profiling by default to match the kube-apiserver. Use --enable-profiling=false to disable. (#88663, @deads2k) [SIG API Machinery, Cloud Provider and Scheduling]
Kubelet pod resources API now provides the information about active pods only. (#79409, @takmatsu) [SIG Node]
New flag --endpointslice-updates-batch-period in kube-controller-manager can be used to reduce the number of endpointslice updates generated by pod changes. (#88745, @mborsz) [SIG API Machinery, Apps and Network]
New flag --show-hidden-metrics-for-version in kube-proxy, kubelet, kube-controller-manager, and kube-scheduler can be used to show all hidden metrics that are deprecated in the previous minor release. (#85279, @RainbowMango) [SIG Cluster Lifecycle and Network]
Features graduated to beta:
StartupProbe (#83437, @matthyx) [SIG Node, Scalability and Testing]
TaintBasedEvictions (#87487, @skilxn-go) [SIG API Machinery, Apps, Node, Scheduling and Testing]
BlockVolume and CSIBlockVolume (#88673, @jsafrane) [SIG Storage]
Windows RunAsUserName (#87790, @marosset) [SIG Apps and Windows]
The following feature gates are removed, because the associated features were unconditionally enabled in previous releases: CustomResourceValidation, CustomResourceSubresources, CustomResourceWebhookConversion, CustomResourcePublishOpenAPI, CustomResourceDefaulting (#87475, @liggitt) [SIG API Machinery]
Feature
API request throttling (due to a high rate of requests) is now reported in client-go logs at log level 2. The messages are of the form:Throttling request took 1.50705208s, request: GET:<URL> The presence of these messages may indicate to the administrator the need to tune the cluster accordingly. (#87740, @jennybuckley) [SIG API Machinery]
Add support for mount options to the FC volume plugin (#87499, @ejweber) [SIG Storage]
Added a config-mode flag in azure auth module to enable getting AAD token without spn: prefix in audience claim. When it's not specified, the default behavior doesn't change. (#87630, @weinong) [SIG API Machinery, Auth, CLI and Cloud Provider]
Allow for configuration of CoreDNS replica count (#85837, @pickledrick) [SIG Cluster Lifecycle]
Allow user to specify resource using --filename flag when invoking kubectl exec (#88460, @soltysh) [SIG CLI and Testing]
Apiserver added a new flag --goaway-chance which is the fraction of requests that will be closed gracefully(GOAWAY) to prevent HTTP/2 clients from getting stuck on a single apiserver. (#88567, @answer1991) [SIG API Machinery]
Azure global rate limit is switched to per-client. A set of new rate limit configure options are introduced, including routeRateLimit, SubnetsRateLimit, InterfaceRateLimit, RouteTableRateLimit, LoadBalancerRateLimit, PublicIPAddressRateLimit, SecurityGroupRateLimit, VirtualMachineRateLimit, StorageAccountRateLimit, DiskRateLimit, SnapshotRateLimit, VirtualMachineScaleSetRateLimit and VirtualMachineSizeRateLimit. The original rate limit options would be default values for those new client's rate limiter. (#86515, @feiskyer) [SIG Cloud Provider]
Azure network and VM clients now suppress requests on throttling (#87122, @feiskyer) [SIG Cloud Provider]
Azure storage clients now suppress requests on throttling (#87306, @feiskyer) [SIG Cloud Provider]
Azure: add support for single stack IPv6 (#88448, @aramase) [SIG Cloud Provider]
DefaultConstraints can be specified for PodTopologySpread Plugin in the scheduler’s ComponentConfig (#88671, @alculquicondor) [SIG Scheduling]
DisableAvailabilitySetNodes is added to avoid VM list for VMSS clusters. It should only be used when vmType is "vmss" and all the nodes (including control plane nodes) are VMSS virtual machines. (#87685, @feiskyer) [SIG Cloud Provider]
Elasticsearch supports automatically setting the advertise address (#85944, @SataQiu) [SIG Cluster Lifecycle and Instrumentation]
EndpointSlices will now be enabled by default. A new EndpointSliceProxying feature gate determines if kube-proxy will use EndpointSlices, this is disabled by default. (#86137, @robscott) [SIG Network]
Kube-proxy: Added dual-stack IPv4/IPv6 support to the iptables proxier. (#82462, @vllry) [SIG Network]
Kubeadm now supports automatic calculations of dual-stack node cidr masks to kube-controller-manager. (#85609, @Arvinderpal) [SIG Cluster Lifecycle]
Kubeadm: add a upgrade health check that deploys a Job (#81319, @neolit123) [SIG Cluster Lifecycle]
Kubeadm: add the experimental feature gate PublicKeysECDSA that can be used to create a
cluster with ECDSA certificates from "kubeadm init". Renewal of existing ECDSA certificates is also supported using "kubeadm alpha certs renew", but not switching between the RSA and ECDSA algorithms on the fly or during upgrades. (#86953, @rojkov) [SIG API Machinery, Auth and Cluster Lifecycle]
Kubeadm: implemented structured output of 'kubeadm config images list' command in JSON, YAML, Go template and JsonPath formats (#86810, @bart0sh) [SIG Cluster Lifecycle]
Kubeadm: on kubeconfig certificate renewal, keep the embedded CA in sync with the one on disk (#88052, @neolit123) [SIG Cluster Lifecycle]
Kubeadm: reject a node joining the cluster if a node with the same name already exists (#81056, @neolit123) [SIG Cluster Lifecycle]
Kubeadm: support Windows specific kubelet flags in kubeadm-flags.env (#88287, @gab-satchi) [SIG Cluster Lifecycle and Windows]
Kubeadm: support automatic retry after failing to pull image (#86899, @SataQiu) [SIG Cluster Lifecycle]
Kubeadm: upgrade supports fallback to the nearest known etcd version if an unknown k8s version is passed (#88373, @SataQiu) [SIG Cluster Lifecycle]
Kubectl/drain: add disable-eviction option.Force drain to use delete, even if eviction is supported. This will bypass checking PodDisruptionBudgets, and should be used with caution. (#85571, @michaelgugino) [SIG CLI]
Kubectl/drain: add skip-wait-for-delete-timeout option. If a pod’s DeletionTimestamp is older than N seconds, skip waiting for the pod. Seconds must be greater than 0 to skip. (#85577, @michaelgugino) [SIG CLI]
Option preConfiguredBackendPoolLoadBalancerTypes is added to azure cloud provider for the pre-configured load balancers, possible values: "", "internal", "external","all" (#86338, @gossion) [SIG Cloud Provider]
PodTopologySpread plugin now excludes terminatingPods when making scheduling decisions. (#87845, @Huang-Wei) [SIG Scheduling]
Provider/azure: Network security groups can now be in a separate resource group. (#87035, @CecileRobertMichon) [SIG Cloud Provider]
Scheduler framework permit plugins now run at the end of the scheduling cycle, after reserve plugins. Waiting on permit will remain in the beginning of the binding cycle. (#88199, @mateuszlitwin) [SIG Scheduling]
Scheduler: Add DefaultBinder plugin (#87430, @alculquicondor) [SIG Scheduling and Testing]
Skip default spreading scoring plugin for pods that define TopologySpreadConstraints (#87566, @skilxn-go) [SIG Scheduling]
The kubectl --dry-run flag now accepts the values 'client', 'server', and 'none', to support client-side and server-side dry-run strategies. The boolean and unset values for the --dry-run flag are deprecated and a value will be required in a future version. (#87580, @julianvmodesto) [SIG CLI]
Support server-side dry-run in kubectl with --dry-run=server for commands including apply, patch, create, run, annotate, label, set, autoscale, drain, rollout undo, and expose. (#87714, @julianvmodesto) [SIG API Machinery, CLI and Testing]
Add --dry-run=server|client to kubectl delete, taint, replace (#88292, @julianvmodesto) [SIG CLI and Testing]
The feature PodTopologySpread (feature gate EvenPodsSpread) has been enabled by default in 1.18. (#88105, @Huang-Wei) [SIG Scheduling and Testing]
The kubelet and the default docker runtime now support running ephemeral containers in the Linux process namespace of a target container. Other container runtimes must implement support for this feature before it will be available for that runtime. (#84731, @verb) [SIG Node]
The underlying format of the CPUManager state file has changed. Upgrades should be seamless, but any third-party tools that rely on reading the previous format need to be updated. (#84462, @klueska) [SIG Node and Testing]
Update CNI version to v0.8.5 (#78819, @justaugustus) [SIG API Machinery, Cluster Lifecycle, Network, Release and Testing]
Webhooks have alpha support for network proxy (#85870, @Jefftree) [SIG API Machinery, Auth and Testing]
When client certificate files are provided, reload files for new connections, and close connections when a certificate changes. (#79083, @jackkleeman) [SIG API Machinery, Auth, Node and Testing]
When deleting objects using kubectl with the --force flag, you are no longer required to also specify --grace-period=0. (#87776, @brianpursley) [SIG CLI]
Windows nodes on GCE can use virtual TPM-based authentication to the control plane. (#85466, @pjh) [SIG Cluster Lifecycle]
You can now pass "--node-ip ::" to kubelet to indicate that it should autodetect an IPv6 address to use as the node's primary address. (#85850, @danwinship) [SIG Cloud Provider, Network and Node]
kubectl now contains a kubectl alpha debug command. This command allows attaching an ephemeral container to a running pod for the purposes of debugging. (#88004, @verb) [SIG CLI]
TLS Server Name overrides can now be specified in a kubeconfig file and via --tls-server-name in kubectl (#88769, @deads2k) [SIG API Machinery, Auth and CLI]
Metrics:
Add rest_client_rate_limiter_duration_seconds metric to component-base to track client side rate limiter latency in seconds. Broken down by verb and URL. (#88134, @jennybuckley) [SIG API Machinery, Cluster Lifecycle and Instrumentation]
Added two client certificate metrics for exec auth:
rest_client_certificate_expiration_seconds a gauge reporting the lifetime of the current client certificate. Reports the time of expiry in seconds since January 1, 1970 UTC.
rest_client_certificate_rotation_age a histogram reporting the age of a just rotated client certificate in seconds. (#84382, @sambdavidson) [SIG API Machinery, Auth, Cluster Lifecycle and Instrumentation]
Controller manager serve workqueue metrics (#87967, @zhan849) [SIG API Machinery]
Following metrics have been turned off:
kubelet_pod_worker_latency_microseconds
kubelet_pod_start_latency_microseconds
kubelet_cgroup_manager_latency_microseconds
kubelet_pod_worker_start_latency_microseconds
kubelet_pleg_relist_latency_microseconds
kubelet_pleg_relist_interval_microseconds
kubelet_eviction_stats_age_microseconds
kubelet_runtime_operations
kubelet_runtime_operations_latency_microseconds
kubelet_runtime_operations_errors
kubelet_device_plugin_registration_count
kubelet_device_plugin_alloc_latency_microseconds
kubelet_docker_operations
kubelet_docker_operations_latency_microseconds
kubelet_docker_operations_errors
kubelet_docker_operations_timeout
network_plugin_operations_latency_microseconds (#83841, @RainbowMango) [SIG Network and Node]
Kube-apiserver metrics will now include request counts, latencies, and response sizes for /healthz, /livez, and /readyz requests. (#83598, @jktomer) [SIG API Machinery]
Kubelet now exports a server_expiration_renew_failure and client_expiration_renew_failure metric counter if the certificate rotations cannot be performed. (#84614, @rphillips) [SIG API Machinery, Auth, CLI, Cloud Provider, Cluster Lifecycle, Instrumentation, Node and Release]
Kubelet: the metric process_start_time_seconds be marked as with the ALPHA stability level. (#85446, @RainbowMango) [SIG API Machinery, Cluster Lifecycle, Instrumentation and Node]
New metric kubelet_pleg_last_seen_seconds to aid diagnosis of PLEG not healthy issues. (#86251, @bboreham) [SIG Node]
Other (Bug, Cleanup or Flake)
Fixed a regression with clients prior to 1.15 not being able to update podIP in pod status, or podCIDR in node spec, against >= 1.16 API servers (#88505, @liggitt) [SIG Apps and Network]
Fixed "kubectl describe statefulsets.apps" printing garbage for rolling update partition (#85846, @phil9909) [SIG CLI]
Add a event to PV when filesystem on PV does not match actual filesystem on disk (#86982, @gnufied) [SIG Storage]
Add azure disk WriteAccelerator support (#87945, @andyzhangx) [SIG Cloud Provider and Storage]
Add delays between goroutines for vm instance update (#88094, @aramase) [SIG Cloud Provider]
Adds "volume.beta.kubernetes.io/migrated-to" annotation to PV's and PVC's when they are migrated to signal external provisioners to pick up those objects for Provisioning and Deleting. (#87098, @davidz627) [SIG Storage]
All api-server log request lines in a more greppable format. (#87203, @lavalamp) [SIG API Machinery]
Azure VMSS LoadBalancerBackendAddressPools updating has been improved with sequential-sync + concurrent-async requests. (#88699, @feiskyer) [SIG Cloud Provider]
Azure cloud provider now obtains AAD token who audience claim will not have spn: prefix (#87590, @weinong) [SIG Cloud Provider]
AzureFile and CephFS use the new Mount library that prevents logging of sensitive mount options. (#88684, @saad-ali) [SIG Storage]
Bind dns-horizontal containers to linux nodes to avoid Windows scheduling on kubernetes cluster includes linux nodes and windows nodes (#83364, @wawa0210) [SIG Cluster Lifecycle and Windows]
Bind kube-dns containers to linux nodes to avoid Windows scheduling (#83358, @wawa0210) [SIG Cluster Lifecycle and Windows]
Bind metadata-agent containers to linux nodes to avoid Windows scheduling on kubernetes cluster includes linux nodes and windows nodes (#83363, @wawa0210) [SIG Cluster Lifecycle, Instrumentation and Windows]
Bind metrics-server containers to linux nodes to avoid Windows scheduling on kubernetes cluster includes linux nodes and windows nodes (#83362, @wawa0210) [SIG Cluster Lifecycle, Instrumentation and Windows]
Bug fixes: Make sure we include latest packages node #351 (@caseydavenport) (#84163, @david-tigera) [SIG Cluster Lifecycle]
CPU limits are now respected for Windows containers. If a node is over-provisioned, no weighting is used, only limits are respected. (#86101, @PatrickLang) [SIG Node, Testing and Windows]
Changed core_pattern on COS nodes to be an absolute path. (#86329, @mml) [SIG Cluster Lifecycle and Node]
Client-go certificate manager rotation gained the ability to preserve optional intermediate chains accompanying issued certificates (#88744, @jackkleeman) [SIG API Machinery and Auth]
Cloud provider config CloudProviderBackoffMode has been removed since it won't be used anymore. (#88463, @feiskyer) [SIG Cloud Provider]
Conformance image now depends on stretch-slim instead of debian-hyperkube-base as that image is being deprecated and removed. (#88702, @dims) [SIG Cluster Lifecycle, Release and Testing]
Deprecate --generator flag from kubectl create commands (#88655, @soltysh) [SIG CLI]
During initialization phase (preflight), kubeadm now verifies the presence of the conntrack executable (#85857, @hnanni) [SIG Cluster Lifecycle]
EndpointSlice should not contain endpoints for terminating pods (#89056, @andrewsykim) [SIG Apps and Network]
Evictions due to pods breaching their ephemeral storage limits are now recorded by the kubelet_evictions metric and can be alerted on. (#87906, @smarterclayton) [SIG Node]
Filter published OpenAPI schema by making nullable, required fields non-required in order to avoid kubectl to wrongly reject null values. (#85722, @sttts) [SIG API Machinery]
Fix /readyz to return error immediately after a shutdown is initiated, before the --shutdown-delay-duration has elapsed. (#88911, @tkashem) [SIG API Machinery]
Fix API Server potential memory leak issue in processing watch request. (#85410, @answer1991) [SIG API Machinery]
Fix EndpointSlice controller race condition and ensure that it handles external changes to EndpointSlices. (#85703, @robscott) [SIG Apps and Network]
Fix IPv6 addresses lost issue in pure ipv6 vsphere environment (#86001, @hubv) [SIG Cloud Provider]
Fix LoadBalancer rule checking so that no unexpected LoadBalancer updates are made (#85990, @feiskyer) [SIG Cloud Provider]
Fix a bug in kube-proxy that caused it to crash when using load balancers with a different IP family (#87117, @aojea) [SIG Network]
Fix a bug in port-forward: named port not working with service (#85511, @oke-py) [SIG CLI]
Fix a bug in the dual-stack IPVS proxier where stale IPv6 endpoints were not being cleaned up (#87695, @andrewsykim) [SIG Network]
Fix a bug that orphan revision cannot be adopted and statefulset cannot be synced (#86801, @likakuli) [SIG Apps]
Fix a bug where ExternalTrafficPolicy is not applied to service ExternalIPs. (#88786, @freehan) [SIG Network]
Fix a bug where kubenet fails to parse the tc output. (#83572, @chendotjs) [SIG Network]
Fix a regression in kubenet that prevent pods to obtain ip addresses (#85993, @chendotjs) [SIG Network and Node]
Fix bug where EndpointSlice controller would attempt to modify shared objects. (#85368, @robscott) [SIG API Machinery, Apps and Network]
Fix handling of aws-load-balancer-security-groups annotation. Security-Groups assigned with this annotation are no longer modified by kubernetes which is the expected behaviour of most users. Also no unnecessary Security-Groups are created anymore if this annotation is used. (#83446, @Elias481) [SIG Cloud Provider]
Fix invalid VMSS updates due to incorrect cache (#89002, @ArchangelSDY) [SIG Cloud Provider]
Fix isCurrentInstance for Windows by removing the dependency of hostname. (#89138, @feiskyer) [SIG Cloud Provider]
Fix issue #85805 about a resource not found in azure cloud provider when LoadBalancer specified in another resource group. (#86502, @levimm) [SIG Cloud Provider]
Fix kubectl annotate error when local=true is set (#86952, @zhouya0) [SIG CLI]
Fix kubectl create deployment image name (#86636, @zhouya0) [SIG CLI]
Fix regression in statefulset conversion which prevents applying a statefulset multiple times. (#87706, @liggitt) [SIG Apps and Testing]
Fix route conflicted operations when updating multiple routes together (#88209, @feiskyer) [SIG Cloud Provider]
Fix that prevents repeated fetching of PVC/PV objects by kubelet when processing of pod volumes fails. While this prevents hammering API server in these error scenarios, it means that some errors in processing volume(s) for a pod could now take up to 2-3 minutes before retry. (#88141, @tedyu) [SIG Node and Storage]
Fix the bug PIP's DNS is deleted if no DNS label service annotation isn't set. (#87246, @nilo19) [SIG Cloud Provider]
Fix control plane hosts rolling upgrade causing thundering herd of LISTs on etcd leading to control plane unavailability. (#86430, @wojtek-t) [SIG API Machinery, Node and Testing]
Fix: add azure disk migration support for CSINode (#88014, @andyzhangx) [SIG Cloud Provider and Storage]
Fix: add remediation in azure disk attach/detach (#88444, @andyzhangx) [SIG Cloud Provider]
Fix: azure data disk should use same key as os disk by default (#86351, @andyzhangx) [SIG Cloud Provider]
Fix: azure disk could not mounted on Standard_DC4s/DC2s instances (#86612, @andyzhangx) [SIG Cloud Provider and Storage]
Fix: azure file mount timeout issue (#88610, @andyzhangx) [SIG Cloud Provider and Storage]
Fix: check disk status before disk azure disk (#88360, @andyzhangx) [SIG Cloud Provider]
Fix: corrupted mount point in csi driver (#88569, @andyzhangx) [SIG Storage]
Fix: get azure disk lun timeout issue (#88158, @andyzhangx) [SIG Cloud Provider and Storage]
Fix: update azure disk max count (#88201, @andyzhangx) [SIG Cloud Provider and Storage]
Fixed "requested device X but found Y" attach error on AWS. (#85675, @jsafrane) [SIG Cloud Provider and Storage]
Fixed NetworkPolicy validation that Except values are accepted when they are outside the CIDR range. (#86578, @tnqn) [SIG Network]
Fixed a bug in the TopologyManager. Previously, the TopologyManager would only guarantee alignment if container creation was serialized in some way. Alignment is now guaranteed under all scenarios of container creation. (#87759, @klueska) [SIG Node]
Fixed a bug which could prevent a provider ID from ever being set for node if an error occurred determining the provider ID when the node was added. (#87043, @zjs) [SIG Apps and Cloud Provider]
Fixed a data race in the kubelet image manager that can cause static pod workers to silently stop working. (#88915, @roycaihw) [SIG Node]
Fixed a panic in the kubelet cleaning up pod volumes (#86277, @tedyu) [SIG Storage]
Fixed a regression where the kubelet would fail to update the ready status of pods. (#84951, @tedyu) [SIG Node]
Fixed an issue that could cause the kubelet to incorrectly run concurrent pod reconciliation loops and crash. (#89055, @tedyu) [SIG Node]
Fixed cleaning of CSI raw block volumes. (#87978, @jsafrane) [SIG Storage]
Fixed AWS Cloud Provider attempting to delete LoadBalancer security group it didn’t provision, and fixed AWS Cloud Provider creating a default LoadBalancer security group even if annotation service.beta.kubernetes.io/aws-load-balancer-security-groups is present because the intended behavior of aws-load-balancer-security-groups is to replace all security groups assigned to the load balancer. (#84265, @bhagwat070919) [SIG Cloud Provider]
Fixed two scheduler metrics (pending_pods and schedule_attempts_total) not being recorded (#87692, @everpeace) [SIG Scheduling]
Fixes an issue with kubelet-reported pod status on deleted/recreated pods. (#86320, @liggitt) [SIG Node]
Fixes conversion error in multi-version custom resources that could cause metadata.generation to increment on no-op patches or updates of a custom resource. (#88995, @liggitt) [SIG API Machinery]
Fixes issue where AAD token obtained by kubectl is incompatible with on-behalf-of flow and oidc. The audience claim before this fix has "spn:" prefix. After this fix, "spn:" prefix is omitted. (#86412, @weinong) [SIG API Machinery, Auth and Cloud Provider]
Fixes an issue where you can't attach more than 15 GCE Persistent Disks to c2, n2, m1, m2 machine types. (#88602, @yuga711) [SIG Storage]
Fixes kube-proxy when EndpointSlice feature gate is enabled on Windows. (#86016, @robscott) [SIG Auth and Network]
Fixes kubelet crash in client certificate rotation cases (#88079, @liggitt) [SIG API Machinery, Auth and Node]
Fixes service account token admission error in clusters that do not run the service account token controller (#87029, @liggitt) [SIG Auth]
Fixes v1.17.0 regression in --service-cluster-ip-range handling with IPv4 ranges larger than 65536 IP addresses (#86534, @liggitt) [SIG Network]
Fixes wrong validation result of NetworkPolicy PolicyTypes (#85747, @tnqn) [SIG Network]
For subprotocol negotiation, both client and server protocol is required now. (#86646, @tedyu) [SIG API Machinery and Node]
For volumes that allow attaches across multiple nodes, attach and detach operations across different nodes are now executed in parallel. (#88678, @verult) [SIG Storage]
Garbage collector now can correctly orphan ControllerRevisions when StatefulSets are deleted with orphan propagation policy. (#84984, @cofyc) [SIG Apps]
Get-kube.sh uses the gcloud's current local GCP service account for auth when the provider is GCE or GKE instead of the metadata server default (#88383, @BenTheElder) [SIG Cluster Lifecycle]
Golang/x/net has been updated to bring in fixes for CVE-2020-9283 (#88381, @BenTheElder) [SIG API Machinery, CLI, Cloud Provider, Cluster Lifecycle and Instrumentation]
If a serving certificate’s param specifies a name that is an IP for an SNI certificate, it will have priority for replying to server connections. (#85308, @deads2k) [SIG API Machinery]
Improved yaml parsing performance (#85458, @cjcullen) [SIG API Machinery, CLI, Cloud Provider, Cluster Lifecycle, Instrumentation and Node]
Improves performance of the node authorizer (#87696, @liggitt) [SIG Auth]
In GKE alpha clusters it will be possible to use the service annotation cloud.google.com/network-tier: Standard (#88487, @zioproto) [SIG Cloud Provider]
Includes FSType when describing CSI persistent volumes. (#85293, @huffmanca) [SIG CLI and Storage]
Iptables/userspace proxy: improve performance by getting local addresses only once per sync loop, instead of for every external IP (#85617, @andrewsykim) [SIG API Machinery, CLI, Cloud Provider, Cluster Lifecycle, Instrumentation and Network]
Kube-aggregator: always sets unavailableGauge metric to reflect the current state of a service. (#87778, @p0lyn0mial) [SIG API Machinery]
Kube-apiserver: fixed a conflict error encountered attempting to delete a pod with gracePeriodSeconds=0 and a resourceVersion precondition (#85516, @michaelgugino) [SIG API Machinery]
Kube-proxy no longer modifies shared EndpointSlices. (#86092, @robscott) [SIG Network]
Kube-proxy: on dual-stack mode, if it is not able to get the IP Family of an endpoint, logs it with level InfoV(4) instead of Warning, avoiding flooding the logs for endpoints without addresses (#88934, @aojea) [SIG Network]
Kubeadm allows to configure single-stack clusters if dual-stack is enabled (#87453, @aojea) [SIG API Machinery, Cluster Lifecycle and Network]
Kubeadm now includes CoreDNS version 1.6.7 (#86260, @rajansandeep) [SIG Cluster Lifecycle]
Kubeadm upgrades always persist the etcd backup for stacked (#86861, @SataQiu) [SIG Cluster Lifecycle]
Kubeadm: 'kubeadm alpha kubelet config download' has been removed, please use 'kubeadm upgrade node phase kubelet-config' instead (#87944, @SataQiu) [SIG Cluster Lifecycle]
Kubeadm: Forward cluster name to the controller-manager arguments (#85817, @ereslibre) [SIG Cluster Lifecycle]
Kubeadm: add support for the "ci/k8s-master" version label as a replacement for "ci-cross/*", which no longer exists. (#86609, @Pensu) [SIG Cluster Lifecycle]
Kubeadm: apply further improvements to the tentative support for concurrent etcd member join. Fixes a bug where multiple members can receive the same hostname. Increase the etcd client dial timeout and retry timeout for add/remove/... operations. (#87505, @neolit123) [SIG Cluster Lifecycle]
Kubeadm: don't write the kubelet environment file on "upgrade apply" (#85412, @boluisa) [SIG Cluster Lifecycle]
Kubeadm: fix potential panic when executing "kubeadm reset" with a corrupted kubelet.conf file (#86216, @neolit123) [SIG Cluster Lifecycle]
Kubeadm: fix the bug that 'kubeadm upgrade' hangs in single node cluster (#88434, @SataQiu) [SIG Cluster Lifecycle]
Kubeadm: make sure images are pre-pulled even if a tag did not change but their contents changed (#85603, @bart0sh) [SIG Cluster Lifecycle]
Kubeadm: remove 'kubeadm upgrade node config' command since it was deprecated in v1.15, please use 'kubeadm upgrade node phase kubelet-config' instead (#87975, @SataQiu) [SIG Cluster Lifecycle]
Kubeadm: remove the deprecated CoreDNS feature-gate. It was set to "true" since v1.11 when the feature went GA. In v1.13 it was marked as deprecated and hidden from the CLI. (#87400, @neolit123) [SIG Cluster Lifecycle]
Kubeadm: retry kubeadm-config ConfigMap creation or mutation if the apiserver is not responding. This will improve resiliency when joining new control plane nodes. (#85763, @ereslibre) [SIG Cluster Lifecycle]
Kubeadm: tolerate whitespace when validating certificate authority PEM data in kubeconfig files (#86705, @neolit123) [SIG Cluster Lifecycle]
Kubeadm: use bind-address option to configure the kube-controller-manager and kube-scheduler http probes (#86493, @aojea) [SIG Cluster Lifecycle]
Kubeadm: uses the api-server AdvertiseAddress IP family to choose the etcd endpoint IP family for non external etcd clusters (#85745, @aojea) [SIG Cluster Lifecycle]
Kubectl cluster-info dump --output-directory=xxx now generates files with an extension depending on the output format. (#82070, @olivierlemasle) [SIG CLI]
Kubectl describe <type> and kubectl top pod will return a message saying "No resources found" or "No resources found in <namespace> namespace" if there are no results to display. (#87527, @brianpursley) [SIG CLI]
Kubectl drain node --dry-run will list pods that would be evicted or deleted (#82660, @sallyom) [SIG CLI]
Kubectl set resources will no longer return an error if passed an empty change for a resource. kubectl set subject will no longer return an error if passed an empty change for a resource. (#85490, @sallyom) [SIG CLI]
Kubelet metrics gathered through metrics-server or prometheus should no longer timeout for Windows nodes running more than 3 pods. (#87730, @marosset) [SIG Node, Testing and Windows]
Kubelet metrics have been changed to buckets. For example the exec/{podNamespace}/{podID}/{containerName} is now just exec. (#87913, @cheftako) [SIG Node]
Kubelets perform fewer unnecessary pod status update operations on the API server. (#88591, @smarterclayton) [SIG Node and Scalability]
Kubernetes will try to acquire the iptables lock every 100 msec during 5 seconds instead of every second. This is especially useful for environments using kube-proxy in iptables mode with a high churn rate of services. (#85771, @aojea) [SIG Network]
Limit number of instances in a single update to GCE target pool to 1000. (#87881, @wojtek-t) [SIG Cloud Provider, Network and Scalability]
Make Azure clients only retry on specified HTTP status codes (#88017, @feiskyer) [SIG Cloud Provider]
Make error message and service event message more clear (#86078, @feiskyer) [SIG Cloud Provider]
Minimize AWS NLB health check timeout when externalTrafficPolicy set to Local (#73363, @kellycampbell) [SIG Cloud Provider]
Pause image upgraded to 3.2 in kubelet and kubeadm. (#88173, @BenTheElder) [SIG CLI, Cluster Lifecycle, Node and Testing]
Plugin/PluginConfig and Policy APIs are mutually exclusive when running the scheduler (#88864, @alculquicondor) [SIG Scheduling]
Remove FilteredNodesStatuses argument from PreScore's interface. (#88189, @skilxn-go) [SIG Scheduling and Testing]
Resolved a performance issue in the node authorizer index maintenance. (#87693, @liggitt) [SIG Auth]
Resolved regression in admission, authentication, and authorization webhook performance in v1.17.0-rc.1 (#85810, @liggitt) [SIG API Machinery and Testing]
Resolves performance regression in kubectl get all and in client-go discovery clients constructed using NewDiscoveryClientForConfig or NewDiscoveryClientForConfigOrDie. (#86168, @liggitt) [SIG API Machinery]
Reverted a kubectl azure auth module change where oidc claim spn: prefix was omitted resulting a breaking behavior with existing Azure AD OIDC enabled api-server (#87507, @weinong) [SIG API Machinery, Auth and Cloud Provider]
Shared informers are now more reliable in the face of network disruption. (#86015, @squeed) [SIG API Machinery]
Specifying PluginConfig for the same plugin more than once fails scheduler startup.
Specifying extenders and configuring .ignoredResources for the NodeResourcesFit plugin fails (#88870, @alculquicondor) [SIG Scheduling]
Terminating a restartPolicy=Never pod no longer has a chance to report the pod succeeded when it actually failed. (#88440, @smarterclayton) [SIG Node and Testing]
The CSR signing cert/key pairs will be reloaded from disk like the kube-apiserver cert/key pairs (#86816, @deads2k) [SIG API Machinery, Apps and Auth]
The EventRecorder from k8s.io/client-go/tools/events will now create events in the default namespace (instead of kube-system) when the related object does not have it set. (#88815, @enj) [SIG API Machinery]
The audit event sourceIPs list will now always end with the IP that sent the request directly to the API server. (#87167, @tallclair) [SIG API Machinery and Auth]
The sample-apiserver aggregated conformance test has updated to use the Kubernetes v1.17.0 sample apiserver (#84735, @liggitt) [SIG API Machinery, Architecture, CLI and Testing]
To reduce chances of throttling, VM cache is set to nil when Azure node provisioning state is deleting (#87635, @feiskyer) [SIG Cloud Provider]
VMSS cache is added so that less chances of VMSS GET throttling (#85885, @nilo19) [SIG Cloud Provider]
Wait for kubelet & kube-proxy to be ready on Windows node within 10s (#85228, @YangLu1031) [SIG Cluster Lifecycle]
kubectl apply -f <file> --prune -n <namespace> should prune all resources not defined in the file in the cli specified namespace. (#85613, @MartinKaburu) [SIG CLI]
kubectl diff now returns 1 only on diff finding changes, and >1 on kubectl errors. The "exit status code 1" message has also been muted. (#87437, @apelisse) [SIG CLI and Testing]
Removes ConfigMap as suggestion for IngressClass parameters (#89093, @robscott) [SIG Network]
Other (Bug, Cleanup or Flake)
EndpointSlice should not contain endpoints for terminating pods (#89056, @andrewsykim) [SIG Apps and Network]
Fix a bug where ExternalTrafficPolicy is not applied to service ExternalIPs. (#88786, @freehan) [SIG Network]
Fix invalid VMSS updates due to incorrect cache (#89002, @ArchangelSDY) [SIG Cloud Provider]
Fix isCurrentInstance for Windows by removing the dependency of hostname. (#89138, @feiskyer) [SIG Cloud Provider]
Fixed a data race in kubelet image manager that can cause static pod workers to silently stop working. (#88915, @roycaihw) [SIG Node]
Fixed an issue that could cause the kubelet to incorrectly run concurrent pod reconciliation loops and crash. (#89055, @tedyu) [SIG Node]
Kube-proxy: on dual-stack mode, if it is not able to get the IP Family of an endpoint, logs it with level InfoV(4) instead of Warning, avoiding flooding the logs for endpoints without addresses (#88934, @aojea) [SIG Network]
(No, really, you MUST read this before you upgrade)
kubectl no longer defaults to http://localhost:8080. If you own one of these legacy clusters, you are *strongly- encouraged to secure your server. If you cannot secure your server, you can set KUBERNETES_MASTER if you were relying on that behavior and you're a client-go user. Set --server, --kubeconfig or KUBECONFIG to make it work in kubectl. (#86173, @soltysh) [SIG API Machinery, CLI and Testing]
Changes by Kind
Deprecation
AlgorithmSource is removed from v1alpha2 Scheduler ComponentConfig (#87999, @damemi) [SIG Scheduling]
Kube-proxy: deprecate --healthz-port and --metrics-port flag, please use --healthz-bind-address and --metrics-bind-address instead (#88512, @SataQiu) [SIG Network]
Kubeadm: deprecate the usage of the experimental flag '--use-api' under the 'kubeadm alpha certs renew' command. (#88827, @neolit123) [SIG Cluster Lifecycle]
API Change
A new IngressClass resource has been added to enable better Ingress configuration. (#88509, @robscott) [SIG API Machinery, Apps, CLI, Network, Node and Testing]
Added GenericPVCDataSource feature gate to enable using arbitrary custom resources as the data source for a PVC. (#88636, @bswartz) [SIG Apps and Storage]
Allow user to specify fsgroup permission change policy for pods (#88488, @gnufied) [SIG Apps and Storage]
BlockVolume and CSIBlockVolume features are now GA. (#88673, @jsafrane) [SIG Apps, Node and Storage]
CustomResourceDefinition schemas that use x-kubernetes-list-map-keys to specify properties that uniquely identify list items must make those properties required or have a default value, to ensure those properties are present for all list items. See https://kubernetes.io/docs/reference/using-api/api-concepts/#merge-strategy for details. (#88076, @eloyekunle) [SIG API Machinery and Testing]
Fixes a regression with clients prior to 1.15 not being able to update podIP in pod status, or podCIDR in node spec, against >= 1.16 API servers (#88505, @liggitt) [SIG Apps and Network]
Ingress: Add Exact and Prefix maching to Ingress PathTypes (#88587, @cmluciano) [SIG Apps, Cluster Lifecycle and Network]
Ingress: Add alternate backends via TypedLocalObjectReference (#88775, @cmluciano) [SIG Apps and Network]
Ingress: allow wildcard hosts in IngressRule (#88858, @cmluciano) [SIG Network]
Kube-controller-manager and kube-scheduler expose profiling by default to match the kube-apiserver. Use --enable-profiling=false to disable. (#88663, @deads2k) [SIG API Machinery, Cloud Provider and Scheduling]
Move TaintBasedEvictions feature gates to GA (#87487, @skilxn-go) [SIG API Machinery, Apps, Node, Scheduling and Testing]
New flag --endpointslice-updates-batch-period in kube-controller-manager can be used to reduce number of endpointslice updates generated by pod changes. (#88745, @mborsz) [SIG API Machinery, Apps and Network]
Scheduler Extenders can now be configured in the v1alpha2 component config (#88768, @damemi) [SIG Release, Scheduling and Testing]
The apiserver/v1alph1#EgressSelectorConfiguration API is now beta. (#88502, @caesarxuchao) [SIG API Machinery]
The storage.k8s.io/CSIDriver has moved to GA, and is now available for use. (#84814, @huffmanca) [SIG API Machinery, Apps, Auth, Node, Scheduling, Storage and Testing]
VolumePVCDataSource moves to GA in 1.18 release (#88686, @j-griffith) [SIG Apps, CLI and Cluster Lifecycle]
Feature
Add rest_client_rate_limiter_duration_seconds metric to component-base to track client side rate limiter latency in seconds. Broken down by verb and URL. (#88134, @jennybuckley) [SIG API Machinery, Cluster Lifecycle and Instrumentation]
Allow user to specify resource using --filename flag when invoking kubectl exec (#88460, @soltysh) [SIG CLI and Testing]
Apiserver add a new flag --goaway-chance which is the fraction of requests that will be closed gracefully(GOAWAY) to prevent HTTP/2 clients from getting stuck on a single apiserver.
After the connection closed(received GOAWAY), the client's other in-flight requests won't be affected, and the client will reconnect.
The flag min value is 0 (off), max is .02 (1/50 requests); .001 (1/1000) is a recommended starting point.
Clusters with single apiservers, or which don't use a load balancer, should NOT enable this. (#88567, @answer1991) [SIG API Machinery]
Azure: add support for single stack IPv6 (#88448, @aramase) [SIG Cloud Provider]
DefaultConstraints can be specified for the PodTopologySpread plugin in the component config (#88671, @alculquicondor) [SIG Scheduling]
Kubeadm: support Windows specific kubelet flags in kubeadm-flags.env (#88287, @gab-satchi) [SIG Cluster Lifecycle and Windows]
Kubectl cluster-info dump changed to only display a message telling you the location where the output was written when the output is not standard output. (#88765, @brianpursley) [SIG CLI]
Print NotReady when pod is not ready based on its conditions. (#88240, @soltysh) [SIG CLI]
Scheduler Extender API is now located under k8s.io/kube-scheduler/extender (#88540, @damemi) [SIG Release, Scheduling and Testing]
Signatures on scale client methods have been modified to accept context.Context as a first argument. Signatures of Get, Update, and Patch methods have been updated to accept GetOptions, UpdateOptions and PatchOptions respectively. (#88599, @julianvmodesto) [SIG API Machinery, Apps, Autoscaling and CLI]
Signatures on the dynamic client methods have been modified to accept context.Context as a first argument. Signatures of Delete and DeleteCollection methods now accept DeleteOptions by value instead of by reference. (#88906, @liggitt) [SIG API Machinery, Apps, CLI, Cluster Lifecycle, Storage and Testing]
Signatures on the metadata client methods have been modified to accept context.Context as a first argument. Signatures of Delete and DeleteCollection methods now accept DeleteOptions by value instead of by reference. (#88910, @liggitt) [SIG API Machinery, Apps and Testing]
Webhooks will have alpha support for network proxy (#85870, @Jefftree) [SIG API Machinery, Auth and Testing]
When client certificate files are provided, reload files for new connections, and close connections when a certificate changes. (#79083, @jackkleeman) [SIG API Machinery, Auth, Node and Testing]
When deleting objects using kubectl with the --force flag, you are no longer required to also specify --grace-period=0. (#87776, @brianpursley) [SIG CLI]
kubectl now contains a kubectl alpha debug command. This command allows attaching an ephemeral container to a running pod for the purposes of debugging. (#88004, @verb) [SIG CLI]
Documentation
Update Japanese translation for kubectl help (#86837, @inductor) [SIG CLI and Docs]
kubectl plugin now prints a note how to install krew (#88577, @corneliusweig) [SIG CLI]
Other (Bug, Cleanup or Flake)
Azure VMSS LoadBalancerBackendAddressPools updating has been improved with squential-sync + concurrent-async requests. (#88699, @feiskyer) [SIG Cloud Provider]
AzureFile and CephFS use new Mount library that prevents logging of sensitive mount options. (#88684, @saad-ali) [SIG API Machinery, CLI, Cloud Provider, Cluster Lifecycle, Instrumentation and Storage]
Build: Enable kube-cross image-building on K8s Infra (#88562, @justaugustus) [SIG Release and Testing]
Client-go certificate manager rotation gained the ability to preserve optional intermediate chains accompanying issued certificates (#88744, @jackkleeman) [SIG API Machinery and Auth]
Conformance image now depends on stretch-slim instead of debian-hyperkube-base as that image is being deprecated and removed. (#88702, @dims) [SIG Cluster Lifecycle, Release and Testing]
Deprecate --generator flag from kubectl create commands (#88655, @soltysh) [SIG CLI]
FIX: prevent apiserver from panicking when failing to load audit webhook config file (#88879, @JoshVanL) [SIG API Machinery and Auth]
Fix /readyz to return error immediately after a shutdown is initiated, before the --shutdown-delay-duration has elapsed. (#88911, @tkashem) [SIG API Machinery]
Fix a bug where kubenet fails to parse the tc output. (#83572, @chendotjs) [SIG Network]
Fix describe ingress annotations not sorted. (#88394, @zhouya0) [SIG CLI]
Fix handling of aws-load-balancer-security-groups annotation. Security-Groups assigned with this annotation are no longer modified by kubernetes which is the expected behaviour of most users. Also no unnecessary Security-Groups are created anymore if this annotation is used. (#83446, @Elias481) [SIG Cloud Provider]
Fix kubectl create deployment image name (#86636, @zhouya0) [SIG CLI]
Fix missing "apiVersion" for "involvedObject" in Events for Nodes. (#87537, @uthark) [SIG Apps and Node]
Fix that prevents repeated fetching of PVC/PV objects by kubelet when processing of pod volumes fails. While this prevents hammering API server in these error scenarios, it means that some errors in processing volume(s) for a pod could now take up to 2-3 minutes before retry. (#88141, @tedyu) [SIG Node and Storage]
Fix: azure file mount timeout issue (#88610, @andyzhangx) [SIG Cloud Provider and Storage]
Fix: corrupted mount point in csi driver (#88569, @andyzhangx) [SIG Storage]
Fixed a bug in the TopologyManager. Previously, the TopologyManager would only guarantee alignment if container creation was serialized in some way. Alignment is now guaranteed under all scenarios of container creation. (#87759, @klueska) [SIG Node]
Fixed block CSI volume cleanup after timeouts. (#88660, @jsafrane) [SIG Node and Storage]
Fixes issue where you can't attach more than 15 GCE Persistent Disks to c2, n2, m1, m2 machine types. (#88602, @yuga711) [SIG Storage]
For volumes that allow attaches across multiple nodes, attach and detach operations across different nodes are now executed in parallel. (#88678, @verult) [SIG Apps, Node and Storage]
Hide kubectl.kubernetes.io/last-applied-configuration in describe command (#88758, @soltysh) [SIG Auth and CLI]
In GKE alpha clusters it will be possible to use the service annotation cloud.google.com/network-tier: Standard (#88487, @zioproto) [SIG Cloud Provider]
Kubelets perform fewer unnecessary pod status update operations on the API server. (#88591, @smarterclayton) [SIG Node and Scalability]
Plugin/PluginConfig and Policy APIs are mutually exclusive when running the scheduler (#88864, @alculquicondor) [SIG Scheduling]
Specifying PluginConfig for the same plugin more than once fails scheduler startup.
Specifying extenders and configuring .ignoredResources for the NodeResourcesFit plugin fails (#88870, @alculquicondor) [SIG Scheduling]
Support TLS Server Name overrides in kubeconfig file and via --tls-server-name in kubectl (#88769, @deads2k) [SIG API Machinery, Auth and CLI]
Terminating a restartPolicy=Never pod no longer has a chance to report the pod succeeded when it actually failed. (#88440, @smarterclayton) [SIG Node and Testing]
The EventRecorder from k8s.io/client-go/tools/events will now create events in the default namespace (instead of kube-system) when the related object does not have it set. (#88815, @enj) [SIG API Machinery]
The audit event sourceIPs list will now always end with the IP that sent the request directly to the API server. (#87167, @tallclair) [SIG API Machinery and Auth]
Update to use golang 1.13.8 (#87648, @ialidzhikov) [SIG Release and Testing]
(No, really, you MUST read this before you upgrade)
The StreamingProxyRedirects feature and --redirect-container-streaming flag are deprecated, and will be removed in a future release. The default behavior (proxy streaming requests through the kubelet) will be the only supported option.
If you are setting --redirect-container-streaming=true, then you must migrate off this configuration. The flag will no longer be able to be enabled starting in v1.20. If you are not setting the flag, no action is necessary. (#88290, @tallclair) [SIG API Machinery and Node]
Yes.
Feature Name: Support using network resources (VNet, LB, IP, etc.) in different AAD Tenant and Subscription than those for the cluster.
Changes in Pull Request:
Add properties networkResourceTenantID and networkResourceSubscriptionID in cloud provider auth config section, which indicates the location of network resources.
Add function GetMultiTenantServicePrincipalToken to fetch multi-tenant service principal token, which will be used by Azure VM/VMSS Clients in this feature.
Add function GetNetworkResourceServicePrincipalToken to fetch network resource service principal token, which will be used by Azure Network Resource (Load Balancer, Public IP, Route Table, Network Security Group and their sub level resources) Clients in this feature.
Azure service annotation service.beta.kubernetes.io/azure-load-balancer-disable-tcp-reset has been deprecated. Its support would be removed in a future release. (#88462, @feiskyer) [SIG Cloud Provider]
API Change
API additions to apiserver types (#87179, @Jefftree) [SIG API Machinery, Cloud Provider and Cluster Lifecycle]
Add Scheduling Profiles to kubescheduler.config.k8s.io/v1alpha2 (#88087, @alculquicondor) [SIG Scheduling and Testing]
Added support for multiple sizes huge pages on a container level (#84051, @bart0sh) [SIG Apps, Node and Storage]
AppProtocol is a new field on Service and Endpoints resources, enabled with the ServiceAppProtocol feature gate. (#88503, @robscott) [SIG Apps and Network]
Fixed missing validation of uniqueness of list items in lists with x-kubernetes-list-type: map or x-kubernetes-list-type: set` in CustomResources. (#84920, @sttts) [SIG API Machinery]
Introduces optional --detect-local flag to kube-proxy.
Currently the only supported value is "cluster-cidr",
which is the default if not specified. (#87748, @satyasm) [SIG Cluster Lifecycle, Network and Scheduling]
Kube-scheduler can run more than one scheduling profile. Given a pod, the profile is selected by using its .spec.SchedulerName. (#88285, @alculquicondor) [SIG Apps, Scheduling and Testing]
Moving Windows RunAsUserName feature to GA (#87790, @marosset) [SIG Apps and Windows]
Feature
Add --dry-run to kubectl delete, taint, replace (#88292, @julianvmodesto) [SIG CLI and Testing]
Add huge page stats to Allocated resources in "kubectl describe node" (#80605, @odinuge) [SIG CLI]
Kubeadm: The ClusterStatus struct present in the kubeadm-config ConfigMap is deprecated and will be removed on a future version. It is going to be maintained by kubeadm until it gets removed. The same information can be found on etcd and kube-apiserver pod annotations, kubeadm.kubernetes.io/etcd.advertise-client-urls and kubeadm.kubernetes.io/kube-apiserver.advertise-address.endpoint respectively. (#87656, @ereslibre) [SIG Cluster Lifecycle]
Kubeadm: add the experimental feature gate PublicKeysECDSA that can be used to create a
cluster with ECDSA certificates from "kubeadm init". Renewal of existing ECDSA certificates is
also supported using "kubeadm alpha certs renew", but not switching between the RSA and
ECDSA algorithms on the fly or during upgrades. (#86953, @rojkov) [SIG API Machinery, Auth and Cluster Lifecycle]
Kubeadm: on kubeconfig certificate renewal, keep the embedded CA in sync with the one on disk (#88052, @neolit123) [SIG Cluster Lifecycle]
Kubeadm: upgrade supports fallback to the nearest known etcd version if an unknown k8s version is passed (#88373, @SataQiu) [SIG Cluster Lifecycle]
New flag --show-hidden-metrics-for-version in kube-scheduler can be used to show all hidden metrics that deprecated in the previous minor release. (#84913, @serathius) [SIG Instrumentation and Scheduling]
Scheduler framework permit plugins now run at the end of the scheduling cycle, after reserve plugins. Waiting on permit will remain in the beginning of the binding cycle. (#88199, @mateuszlitwin) [SIG Scheduling]
The kubelet and the default docker runtime now support running ephemeral containers in the Linux process namespace of a target container. Other container runtimes must implement this feature before it will be available in that runtime. (#84731, @verb) [SIG Node]
Other (Bug, Cleanup or Flake)
Add delays between goroutines for vm instance update (#88094, @aramase) [SIG Cloud Provider]
CPU limits are now respected for Windows containers. If a node is over-provisioned, no weighting is used - only limits are respected. (#86101, @PatrickLang) [SIG Node, Testing and Windows]
Cloud provider config CloudProviderBackoffMode has been removed since it won't be used anymore. (#88463, @feiskyer) [SIG Cloud Provider]
Evictions due to pods breaching their ephemeral storage limits are now recorded by the kubelet_evictions metric and can be alerted on. (#87906, @smarterclayton) [SIG Node]
Fix: add remediation in azure disk attach/detach (#88444, @andyzhangx) [SIG Cloud Provider]
Fix: check disk status before disk azure disk (#88360, @andyzhangx) [SIG Cloud Provider]
Fixed cleaning of CSI raw block volumes. (#87978, @jsafrane) [SIG Storage]
Get-kube.sh uses the gcloud's current local GCP service account for auth when the provider is GCE or GKE instead of the metadata server default (#88383, @BenTheElder) [SIG Cluster Lifecycle]
Golang/x/net has been updated to bring in fixes for CVE-2020-9283 (#88381, @BenTheElder) [SIG API Machinery, CLI, Cloud Provider, Cluster Lifecycle and Instrumentation]
Kubeadm now includes CoreDNS version 1.6.7 (#86260, @rajansandeep) [SIG Cluster Lifecycle]
Kubeadm: fix the bug that 'kubeadm upgrade' hangs in single node cluster (#88434, @SataQiu) [SIG Cluster Lifecycle]
Optimize kubectl version help info (#88313, @zhouya0) [SIG CLI]
Removes the deprecated command kubectl rolling-update (#88057, @julianvmodesto) [SIG Architecture, CLI and Testing]
Kubeadm: command line option "kubelet-version" for kubeadm upgrade node has been deprecated and will be removed in a future release. (#87942, @SataQiu) [SIG Cluster Lifecycle]
API Change
Kubelet podresources API now provides the information about active pods only. (#79409, @takmatsu) [SIG Node]
Remove deprecated fields from .leaderElection in kubescheduler.config.k8s.io/v1alpha2 (#87904, @alculquicondor) [SIG Scheduling]
Signatures on generated clientset methods have been modified to accept context.Context as a first argument. Signatures of generated Create, Update, and Patch methods have been updated to accept CreateOptions, UpdateOptions and PatchOptions respectively. Clientsets that with the previous interface have been added in new "deprecated" packages to allow incremental migration to the new APIs. The deprecated packages will be removed in the 1.21 release. (#87299, @mikedanese) [SIG API Machinery, Apps, Auth, Autoscaling, CLI, Cloud Provider, Cluster Lifecycle, Instrumentation, Network, Node, Scheduling, Storage, Testing and Windows]
The k8s.io/node-api component is no longer updated. Instead, use the RuntimeClass types located within k8s.io/api, and the generated clients located within k8s.io/client-go (#87503, @liggitt) [SIG Node and Release]
Feature
Add indexer for storage cacher (#85445, @shaloulcy) [SIG API Machinery]
Add support for mount options to the FC volume plugin (#87499, @ejweber) [SIG Storage]
Added a config-mode flag in azure auth module to enable getting AAD token without spn: prefix in audience claim. When it's not specified, the default behavior doesn't change. (#87630, @weinong) [SIG API Machinery, Auth, CLI and Cloud Provider]
Introduced BackoffManager interface for backoff management (#87829, @zhan849) [SIG API Machinery]
PodTopologySpread plugin now excludes terminatingPods when making scheduling decisions. (#87845, @Huang-Wei) [SIG Scheduling]
Promote CSIMigrationOpenStack to Beta (off by default since it requires installation of the OpenStack Cinder CSI Driver)
The in-tree AWS OpenStack Cinder "kubernetes.io/cinder" was already deprecated a while ago and will be removed in 1.20. Users should enable CSIMigration + CSIMigrationOpenStack features and install the OpenStack Cinder CSI Driver (https://github.com/kubernetes-sigs/cloud-provider-openstack) to avoid disruption to existing Pod and PVC objects at that time.
Users should start using the OpenStack Cinder CSI Driver directly for any new volumes. (#85637, @dims) [SIG Cloud Provider]
Design
The scheduler Permit extension point doesn't return a boolean value in its Allow() and Reject() functions. (#87936, @Huang-Wei) [SIG Scheduling]
Other (Bug, Cleanup or Flake)
Adds "volume.beta.kubernetes.io/migrated-to" annotation to PV's and PVC's when they are migrated to signal external provisioners to pick up those objects for Provisioning and Deleting. (#87098, @davidz627) [SIG Apps and Storage]
Fix a bug in the dual-stack IPVS proxier where stale IPv6 endpoints were not being cleaned up (#87695, @andrewsykim) [SIG Network]
Fixed NetworkPolicy validation that Except values are accepted when they are outside the CIDR range. (#86578, @tnqn) [SIG Network]
Improves performance of the node authorizer (#87696, @liggitt) [SIG Auth]
Iptables/userspace proxy: improve performance by getting local addresses only once per sync loop, instead of for every external IP (#85617, @andrewsykim) [SIG API Machinery, CLI, Cloud Provider, Cluster Lifecycle, Instrumentation and Network]
Kube-aggregator: always sets unavailableGauge metric to reflect the current state of a service. (#87778, @p0lyn0mial) [SIG API Machinery]
Kubeadm allows to configure single-stack clusters if dual-stack is enabled (#87453, @aojea) [SIG API Machinery, Cluster Lifecycle and Network]
Kubeadm: 'kubeadm alpha kubelet config download' has been removed, please use 'kubeadm upgrade node phase kubelet-config' instead (#87944, @SataQiu) [SIG Cluster Lifecycle]
Kubeadm: remove 'kubeadm upgrade node config' command since it was deprecated in v1.15, please use 'kubeadm upgrade node phase kubelet-config' instead (#87975, @SataQiu) [SIG Cluster Lifecycle]
Kubectl describe and kubectl top pod will return a message saying "No resources found" or "No resources found in namespace" if there are no results to display. (#87527, @brianpursley) [SIG CLI]
Kubelet metrics gathered through metrics-server or prometheus should no longer timeout for Windows nodes running more than 3 pods. (#87730, @marosset) [SIG Node, Testing and Windows]
Kubelet metrics have been changed to buckets.
For example the exec/{podNamespace}/{podID}/{containerName} is now just exec. (#87913, @cheftako) [SIG Node]
Limit number of instances in a single update to GCE target pool to 1000. (#87881, @wojtek-t) [SIG Cloud Provider, Network and Scalability]
Make Azure clients only retry on specified HTTP status codes (#88017, @feiskyer) [SIG Cloud Provider]
Remove all the generators from kubectl run. It will now only create pods. Additionally, deprecates all the flags that are not relevant anymore. (#87077, @soltysh) [SIG Architecture, SIG CLI, and SIG Testing]
kubeadm: kube-dns is deprecated and will not be supported in a future version (#86574, @SataQiu) [SIG Cluster Lifecycle]
--enable-cadvisor-endpoints is now disabled by default. If you need access to the cAdvisor v1 Json API please enable it explicitly in the kubelet command line. Please note that this flag was deprecated in 1.15 and will be removed in 1.19. (#87440, @dims) [SIG Instrumentation, SIG Node, and SIG Testing]
The following feature gates are removed, because the associated features were unconditionally enabled in previous releases: CustomResourceValidation, CustomResourceSubresources, CustomResourceWebhookConversion, CustomResourcePublishOpenAPI, CustomResourceDefaulting (#87475, @liggitt) [SIG API Machinery]
Feature
aggragation api will have alpha support for network proxy (#87515, @Sh4d1) [SIG API Machinery]
API request throttling (due to a high rate of requests) is now reported in client-go logs at log level 2. The messages are of the form
Throttling request took 1.50705208s, request: GET:
The presence of these messages, may indicate to the administrator the need to tune the cluster accordingly. (#87740, @jennybuckley) [SIG API Machinery]
kubeadm: reject a node joining the cluster if a node with the same name already exists (#81056, @neolit123) [SIG Cluster Lifecycle]
disableAvailabilitySetNodes is added to avoid VM list for VMSS clusters. It should only be used when vmType is "vmss" and all the nodes (including masters) are VMSS virtual machines. (#87685, @feiskyer) [SIG Cloud Provider]
The kubectl --dry-run flag now accepts the values 'client', 'server', and 'none', to support client-side and server-side dry-run strategies. The boolean and unset values for the --dry-run flag are deprecated and a value will be required in a future version. (#87580, @julianvmodesto) [SIG CLI]
Add support for pre-allocated hugepages for more than one page size (#82820, @odinuge) [SIG Apps]
Update CNI version to v0.8.5 (#78819, @justaugustus) [SIG API Machinery, SIG Cluster Lifecycle, SIG Network, SIG Release, and SIG Testing]
Skip default spreading scoring plugin for pods that define TopologySpreadConstraints (#87566, @skilxn-go) [SIG Scheduling]
Added more details to taint toleration errors (#87250, @starizard) [SIG Apps, and SIG Scheduling]
Scheduler: Add DefaultBinder plugin (#87430, @alculquicondor) [SIG Scheduling, and SIG Testing]
Kube-apiserver metrics will now include request counts, latencies, and response sizes for /healthz, /livez, and /readyz requests. (#83598, @jktomer) [SIG API Machinery]
Other (Bug, Cleanup or Flake)
Fix the masters rolling upgrade causing thundering herd of LISTs on etcd leading to control plane unavailability. (#86430, @wojtek-t) [SIG API Machinery, SIG Node, and SIG Testing]
kubectl diff now returns 1 only on diff finding changes, and >1 on kubectl errors. The "exit status code 1" message as also been muted. (#87437, @apelisse) [SIG CLI, and SIG Testing]
To reduce chances of throttling, VM cache is set to nil when Azure node provisioning state is deleting (#87635, @feiskyer) [SIG Cloud Provider]
Fix regression in statefulset conversion which prevented applying a statefulset multiple times. (#87706, @liggitt) [SIG Apps, and SIG Testing]
fixed two scheduler metrics (pending_pods and schedule_attempts_total) not being recorded (#87692, @everpeace) [SIG Scheduling]
Resolved a performance issue in the node authorizer index maintenance. (#87693, @liggitt) [SIG Auth]
Removed the 'client' label from apiserver_request_total. (#87669, @logicalhan) [SIG API Machinery, and SIG Instrumentation]
(*"k8s.io/client-go/rest".Request).{Do,DoRaw,Stream,Watch} now require callers to pass a context.Context as an argument. The context is used for timeout and cancellation signaling and to pass supplementary information to round trippers in the wrapped transport chain. If you don't need any of this functionality, it is sufficient to pass a context created with context.Background() to these functions. The (*"k8s.io/client-go/rest".Request).Context method is removed now that all methods that execute a request accept a context directly. (#87597, @mikedanese) [SIG API Machinery, SIG Apps, SIG Auth, SIG Autoscaling, SIG CLI, SIG Cloud Provider, SIG Cluster Lifecycle, SIG Instrumentation, SIG Network, SIG Node, SIG Scheduling, SIG Storage, and SIG Testing]
For volumes that allow attaches across multiple nodes, attach and detach operations across different nodes are now executed in parallel. (#87258, @verult) [SIG Apps, SIG Node, and SIG Storage]
kubeadm: apply further improvements to the tentative support for concurrent etcd member join. Fixes a bug where multiple members can receive the same hostname. Increase the etcd client dial timeout and retry timeout for add/remove/... operations. (#87505, @neolit123) [SIG Cluster Lifecycle]
Reverted a kubectl azure auth module change where oidc claim spn: prefix was omitted resulting a breaking behavior with existing Azure AD OIDC enabled api-server (#87507, @weinong) [SIG API Machinery, SIG Auth, and SIG Cloud Provider]
Update cri-tools to v1.17.0 (#86305, @saschagrunert) [SIG Cluster Lifecycle, and SIG Release]
kubeadm: remove the deprecated CoreDNS feature-gate. It was set to "true" since v1.11 when the feature went GA. In v1.13 it was marked as deprecated and hidden from the CLI. (#87400, @neolit123) [SIG Cluster Lifecycle]
Shared informers are now more reliable in the face of network disruption. (#86015, @squeed) [SIG API Machinery]
the CSR signing cert/key pairs will be reloaded from disk like the kube-apiserver cert/key pairs (#86816, @deads2k) [SIG API Machinery, SIG Apps, and SIG Auth]
"kubectl describe statefulsets.apps" prints garbage for rolling update partition (#85846, @phil9909) [SIG CLI]
fix a bug that orphan revision cannot be adopted and statefulset cannot be synced (#86801, @likakuli)
Azure storage clients now suppress requests on throttling (#87306, @feiskyer)
Introduce Alpha field Immutable in both Secret and ConfigMap objects to mark their contents as immutable. The implementation is hidden behind feature gate ImmutableEphemeralVolumes (currently in Alpha stage). (#86377, @wojtek-t)
EndpointSlices will now be enabled by default. A new EndpointSliceProxying feature gate determines if kube-proxy will use EndpointSlices, this is disabled by default. (#86137, @robscott)
kubeadm upgrades always persist the etcd backup for stacked (#86861, @SataQiu)
Fix the bug PIP's DNS is deleted if no DNS label service annotation isn't set. (#87246, @nilo19)
New flag --show-hidden-metrics-for-version in kube-controller-manager can be used to show all hidden metrics that deprecated in the previous minor release. (#85281, @RainbowMango)
Azure network and VM clients now suppress requests on throttling (#87122, @feiskyer)
kubectl apply -f <file> --prune -n <namespace> should prune all resources not defined in the file in the cli specified namespace. (#85613, @MartinKaburu)
Fixes service account token admission error in clusters that do not run the service account token controller (#87029, @liggitt)
CustomResourceDefinition status fields are no longer required for client validation when submitting manifests. (#87213, @hasheddan)
All apiservers log request lines in a more greppable format. (#87203, @lavalamp)
provider/azure: Network security groups can now be in a separate resource group. (#87035, @CecileRobertMichon)
Cleaned up the output from kubectl describe CSINode <name>. (#85283, @huffmanca)
AWS Cloud Provider attempts to delete LoadBalancer security group it didn’t provision
AWS Cloud Provider creates default LoadBalancer security group even if annotation [service.beta.kubernetes.io/aws-load-balancer-security-groups] is present
kubelet: resource metrics endpoint /metrics/resource/v1alpha1 as well as all metrics under this endpoint have been deprecated. (#86282, @RainbowMango)
Please convert to the following metrics emitted by endpoint /metrics/resource:
You can now pass "--node-ip ::" to kubelet to indicate that it should autodetect an IPv6 address to use as the node's primary address. (#85850, @danwinship)
kubeadm: support automatic retry after failing to pull image (#86899, @SataQiu)
Fixed a bug which could prevent a provider ID from ever being set for node if an error occurred determining the provider ID when the node was added. (#87043, @zjs)
fix a regression in kubenet that prevent pods to obtain ip addresses (#85993, @chendotjs)
Bind kube-dns containers to linux nodes to avoid Windows scheduling (#83358, @wawa0210)
The following features are unconditionally enabled and the corresponding --feature-gates flags have been removed: PodPriority, TaintNodesByCondition, ResourceQuotaScopeSelectors and ScheduleDaemonSetPods (#86210, @draveness)
Bind dns-horizontal containers to linux nodes to avoid Windows scheduling on kubernetes cluster includes linux nodes and windows nodes (#83364, @wawa0210)
fix kubectl annotate error when local=true is set (#86952, @zhouya0)
Add VolumeBinder method to FrameworkHandle interface, which allows user to get the volume binder when implementing scheduler framework plugins. (#86940, @skilxn-go)
elasticsearch supports automatically setting the advertise address (#85944, @SataQiu)
If a serving certificates param specifies a name that is an IP for an SNI certificate, it will have priority for replying to server connections. (#85308, @deads2k)
kube-proxy: Added dual-stack IPv4/IPv6 support to the iptables proxier. (#82462, @vllry)
Azure VMSS/VMSSVM clients now suppress requests on throttling (#86740, @feiskyer)
New metric kubelet_pleg_last_seen_seconds to aid diagnosis of PLEG not healthy issues. (#86251, @bboreham)
For subprotocol negotiation, both client and server protocol is required now. (#86646, @tedyu)
kubeadm: use bind-address option to configure the kube-controller-manager and kube-scheduler http probes (#86493, @aojea)
Marked scheduler's metrics scheduling_algorithm_predicate_evaluation_seconds and (#86584, @xiaoanyunfei)
scheduling_algorithm_priority_evaluation_seconds as deprecated. Those are replaced by framework_extension_point_duration_seconds[extenstion_point="Filter"] and framework_extension_point_duration_seconds[extenstion_point="Score"] respectively.
Marked scheduler's scheduling_duration_seconds Summary metric as deprecated (#86586, @xiaoanyunfei)
Add instructions about how to bring up e2e test cluster (#85836, @YangLu1031)
If a required flag is not provided to a command, the user will only see the required flag error message, instead of the entire usage menu. (#86693, @sallyom)
kubeadm: tolerate whitespace when validating certificate authority PEM data in kubeconfig files (#86705, @neolit123)
kubeadm: add support for the "ci/k8s-master" version label as a replacement for "ci-cross/*", which no longer exists. (#86609, @Pensu)
Fix EndpointSlice controller race condition and ensure that it handles external changes to EndpointSlices. (#85703, @robscott)
Fix nil pointer dereference in azure cloud provider (#85975, @ldx)
fix: azure disk could not mounted on Standard_DC4s/DC2s instances (#86612, @andyzhangx)
Fixes v1.17.0 regression in --service-cluster-ip-range handling with IPv4 ranges larger than 65536 IP addresses (#86534, @liggitt)
Adds back support for AlwaysCheckAllPredicates flag. (#86496, @ahg-g)
Azure global rate limit is switched to per-client. A set of new rate limit configure options are introduced, including routeRateLimit, SubnetsRateLimit, InterfaceRateLimit, RouteTableRateLimit, LoadBalancerRateLimit, PublicIPAddressRateLimit, SecurityGroupRateLimit, VirtualMachineRateLimit, StorageAccountRateLimit, DiskRateLimit, SnapshotRateLimit, VirtualMachineScaleSetRateLimit and VirtualMachineSizeRateLimit. (#86515, @feiskyer)
The original rate limit options would be default values for those new client's rate limiter.
Fix issue #85805 about resource not found in azure cloud provider when lb specified in other resource group. (#86502, @levimm)
AlwaysCheckAllPredicates is deprecated in scheduler Policy API. (#86369, @Huang-Wei)
Kubernetes KMS provider for data encryption now supports disabling the in-memory data encryption key (DEK) cache by setting cachesize to a negative value. (#86294, @enj)
option preConfiguredBackendPoolLoadBalancerTypes is added to azure cloud provider for the pre-configured load balancers, possible values: "", "internal", "external", "all"` (#86338, @gossion)
Promote StartupProbe to beta for 1.18 release (#83437, @matthyx)
Fixes issue where AAD token obtained by kubectl is incompatible with on-behalf-of flow and oidc. (#86412, @weinong)
The audience claim before this fix has "spn:" prefix. After this fix, "spn:" prefix is omitted.
change CounterVec to Counter about PLEGDiscardEvent (#86167, @yiyang5055)
hollow-node do not use remote CRI anymore (#86425, @jkaniuk)
Currently, if users were to explicitly specify CacheSize of 0 for KMS provider, they would end-up with a provider that caches up to 1000 keys. This PR changes this behavior.
Post this PR, when users supply 0 for CacheSize this will result in a validation error.
CacheSize type was changed from int32 to *int32. This allows defaulting logic to differentiate between cases where users explicitly supplied 0 vs. not supplied any value.
KMS Provider's endpoint (path to Unix socket) is now validated when the EncryptionConfiguration files is loaded. This used to be handled by the GRPCService.
Other notable changes
fix: azure data disk should use same key as os disk by default (#86351, @andyzhangx)
New flag --show-hidden-metrics-for-version in kube-proxy can be used to show all hidden metrics that deprecated in the previous minor release. (#85279, @RainbowMango)
The sample-apiserver aggregated conformance test has updated to use the Kubernetes v1.17.0 sample apiserver (#84735, @liggitt)
The underlying format of the CPUManager state file has changed. Upgrades should be seamless, but any third-party tools that rely on reading the previous format need to be updated. (#84462, @klueska)
kubernetes will try to acquire the iptables lock every 100 msec during 5 seconds instead of every second. This specially useful for environments using kube-proxy in iptables mode with a high churn rate of services. (#85771, @aojea)
Fixed a panic in the kubelet cleaning up pod volumes (#86277, @tedyu)
azure cloud provider cache TTL is configurable, list of the azure cloud provider is as following: (#86266, @zqingqing1)
"availabilitySetNodesCacheTTLInSeconds"
"vmssCacheTTLInSeconds"
"vmssVirtualMachinesCacheTTLInSeconds"
"vmCacheTTLInSeconds"
"loadBalancerCacheTTLInSeconds"
"nsgCacheTTLInSeconds"
"routeTableCacheTTLInSeconds"
Fixes kube-proxy when EndpointSlice feature gate is enabled on Windows. (#86016, @robscott)
Fixes wrong validation result of NetworkPolicy PolicyTypes (#85747, @tnqn)
Fixes an issue with kubelet-reported pod status on deleted/recreated pods. (#86320, @liggitt)
kube-apiserver no longer serves the following deprecated APIs: (#85903, @liggitt)
* All resources under apps/v1beta1 and apps/v1beta2 - use apps/v1 instead
* daemonsets, deployments, replicasets resources under extensions/v1beta1 - use apps/v1 instead
* networkpolicies resources under extensions/v1beta1 - use networking.k8s.io/v1 instead
* podsecuritypolicies resources under extensions/v1beta1 - use policy/v1beta1 instead
kubeadm: fix potential panic when executing "kubeadm reset" with a corrupted kubelet.conf file (#86216, @neolit123)
Fix a bug in port-forward: named port not working with service (#85511, @oke-py)
kube-proxy no longer modifies shared EndpointSlices. (#86092, @robscott)
Fixed a regression where the kubelet would fail to update the ready status of pods. (#84951, @tedyu)
Resolves performance regression in client-go discovery clients constructed using NewDiscoveryClientForConfig or NewDiscoveryClientForConfigOrDie. (#86168, @liggitt)
Make error message and service event message more clear (#86078, @feiskyer)
e2e-test-framework: add e2e test namespace dump if all tests succeed but the cleanup fails. (#85542, @schrodit)
kubelet: the metric process_start_time_seconds be marked as with the ALPHA stability level. (#85446, @RainbowMango)
API request throttling (due to a high rate of requests) is now reported in the kubelet (and other component) logs by default. The messages are of the form (#80649, @RobertKrawitz)
Throttling request took 1.50705208s, request: GET:
The presence of large numbers of these messages, particularly with long delay times, may indicate to the administrator the need to tune the cluster accordingly.
Fix API Server potential memory leak issue in processing watch request. (#85410, @answer1991)
Verify kubelet & kube-proxy can recover after being killed on Windows nodes (#84886, @YangLu1031)
Fixed an issue that the scheduler only returns the first failure reason. (#86022, @Huang-Wei)
Renamed Kubelet metric certificate_manager_server_expiration_seconds to certificate_manager_server_ttl_seconds and changed to report the second until expiration at read time rather than absolute time of expiry. (#85874, @sambdavidson)
Improved accuracy of Kubelet metric rest_client_exec_plugin_ttl_seconds.
Bind metadata-agent containers to linux nodes to avoid Windows scheduling on kubernetes cluster includes linux nodes and windows nodes (#83363, @wawa0210)
Bind metrics-server containers to linux nodes to avoid Windows scheduling on kubernetes cluster includes linux nodes and windows nodes (#83362, @wawa0210)
During initialization phase (preflight), kubeadm now verifies the presence of the conntrack executable (#85857, @hnanni)
VMSS cache is added so that less chances of VMSS GET throttling (#85885, @nilo19)
Update go-winio module version from 0.4.11 to 0.4.14 (#85739, @wawa0210)
Fix LoadBalancer rule checking so that no unexpected LoadBalancer updates are made (#85990, @feiskyer)
kubectl drain node --dry-run will list pods that would be evicted or deleted (#82660, @sallyom)
Windows nodes on GCE can use TPM-based authentication to the master. (#85466, @pjh)
Force drain to use delete, even if eviction is supported. This will bypass checking PodDisruptionBudgets, and should be used with caution.
kubeadm now errors out whenever a not supported component config version is supplied for the kubelet and kube-proxy (#85639, @rosti)
Fixed issue with addon-resizer using deprecated extensions APIs (#85793, @bskiba)
Includes FSType when describing CSI persistent volumes. (#85293, @huffmanca)
kubelet now exports a "server_expiration_renew_failure" and "client_expiration_renew_failure" metric counter if the certificate rotations cannot be performed. (#84614, @rphillips)
kubeadm: don't write the kubelet environment file on "upgrade apply" (#85412, @boluisa)
kubeadm: retry kubeadm-config ConfigMap creation or mutation if the apiserver is not responding. This will improve resiliency when joining new control plane nodes. (#85763, @ereslibre)
Filter published OpenAPI schema by making nullable, required fields non-required in order to avoid kubectl to wrongly reject null values. (#85722, @sttts)
kubectl set resources will no longer return an error if passed an empty change for a resource. (#85490, @sallyom)
kubectl set subject will no longer return an error if passed an empty change for a resource.
kube-apiserver: fixed a conflict error encountered attempting to delete a pod with gracePeriodSeconds=0 and a resourceVersion precondition (#85516, @michaelgugino)
kubeadm: add a upgrade health check that deploys a Job (#81319, @neolit123)
kubeadm: make sure images are pre-pulled even if a tag did not change but their contents changed (#85603, @bart0sh)
kube-apiserver: Fixes a bug that hidden metrics can not be enabled by the command-line option --show-hidden-metrics-for-version. (#85444, @RainbowMango)
kubeadm now supports automatic calculations of dual-stack node cidr masks to kube-controller-manager. (#85609, @Arvinderpal)
Fix bug where EndpointSlice controller would attempt to modify shared objects. (#85368, @robscott)
Use context to check client closed instead of http.CloseNotifier in processing watch request which will reduce 1 goroutine for each request if proto is HTTP/2.x . (#85408, @answer1991)
kubeadm: reset raises warnings if it cannot delete folders (#85265, @SataQiu)
Wait for kubelet & kube-proxy to be ready on Windows node within 10s (#85228, @YangLu1031)
error: failed to run Kubelet: failed to create kubelet:
misconfiguration: kubelet cgroup driver: "systemd" is different from docker cgroup driver: "cgroupfs"
# kubectl get pods
Unable to connect to the server: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes")
在某些情况下 kubectl logs 和 kubectl run 命令或许会返回以下错误,即便除此之外集群一切功能正常:
Error from server: Get https://10.19.0.41:10250/containerLogs/default/mysql-ddc65b868-glc5m/mysql: dial tcp 10.19.0.41:10250: getsockopt: no route to host
这或许是由于 Kubernetes 使用的 IP 无法与看似相同的子网上的其他 IP 进行通信的缘故,
可能是由机器提供商的政策所导致的。
Digital Ocean 既分配一个共有 IP 给 eth0,也分配一个私有 IP 在内部用作其浮动 IP 功能的锚点,
然而 kubelet 将选择后者作为节点的 InternalIP 而不是公共 IP
使用 ip addr show 命令代替 ifconfig 命令去检查这种情况,因为 ifconfig 命令
不会显示有问题的别名 IP 地址。或者指定的 Digital Ocean 的 API 端口允许从 droplet 中
查询 anchor IP:
在云环境场景中,可能出现在云控制管理器完成节点地址初始化之前,kube-proxy 就被调度到新节点了。
这会导致 kube-proxy 无法正确获取节点的 IP 地址,并对管理负载平衡器的代理功能产生连锁反应。
在 kube-proxy Pod 中可以看到以下错误:
server.go:610] Failed to retrieve node IP: host IP unknown; known addresses: []
proxier.go:340] invalid nodeIP, initializing kube-proxy with 127.0.0.1 as nodeIP
Your Kubernetes control-plane has initialized successfully!
To start using your cluster, you need to run the following as a regular user:
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
You should now deploy a Pod network to the cluster.
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
/docs/concepts/cluster-administration/addons/
You can now join any number of machines by running the following on each node
as root:
kubeadm join <control-plane-host>:<control-plane-port> --token <token> --discovery-token-ca-cert-hash sha256:<hash>
[preflight] Running pre-flight checks
... (log output of join workflow) ...
Node join complete:
* Certificate signing request sent to control-plane and response
received.
* Kubelet informed of new secure connection details.
Run 'kubectl get nodes' on control-plane to see this machine join.
几秒钟后,当你在控制平面节点上执行 kubectl get nodes,你会注意到该节点出现在输出中。
cat << EOF > /etc/systemd/system/kubelet.service.d/20-etcd-service-manager.conf
[Service]
ExecStart=
# Replace "systemd" with the cgroup driver of your container runtime. The default value in the kubelet is "cgroupfs".
ExecStart=/usr/bin/kubelet --address=127.0.0.1 --pod-manifest-path=/etc/kubernetes/manifests --cgroup-driver=systemd
Restart=always
EOF
systemctl daemon-reload
systemctl restart kubelet
Kubespray 提供了一种使用 Netchecker
验证 Pod 间连接和 DNS 解析的方法。
Netchecker 确保 netchecker-agents pod 可以解析。
DNS 请求并在默认名称空间内对每个请求执行 ping 操作。
这些 Pods 模仿其余工作负载的类似行为,并用作集群运行状况指示器。
在很多组织中,其服务和应用的很大比例是 Windows 应用。
Windows 容器提供了一种对进程和包依赖关系
进行封装的现代方式,这使得用户更容易采用 DevOps 实践,令 Windows 应用同样遵从
云原生模式。
Kubernetes 已经成为事实上的标准容器编排器,Kubernetes 1.14 发行版本中包含了将
Windows 容器调度到 Kubernetes 集群中 Windows 节点上的生产级支持,从而使得巨大
的 Windows 应用生态圈能够充分利用 Kubernetes 的能力。
对于同时投入基于 Windows 应用和 Linux 应用的组织而言,他们不必寻找不同的编排系统
来管理其工作负载,其跨部署的运维效率得以大幅提升,而不必关心所用操作系统。
kubernetes 中的 Windows 容器
若要在 Kubernetes 中启用对 Windows 容器的编排,只需在现有的 Linux 集群中
包含 Windows 节点。在 Kubernetes 上调度 Pods
中的 Windows 容器与调用基于 Linux 的容器一样简单、一样容易。
为了运行 Windows 容器,你的 Kubernetes 集群必须包含多个操作系统,控制面
节点运行 Linux,工作节点则可以根据负载需要运行 Windows 或 Linux。
Windows Server 2019 是唯一被支持的 Windows 操作系统,在 Windows 上启用
Kubernetes 节点
支持(包括 kubelet, 容器运行时、
以及 kube-proxy)。关于 Windows 发行版渠道的详细讨论,可参见
Microsoft 文档。
说明: Kubernetes 控制面,包括主控组件,继续
在 Linux 上运行。目前没有支持完全是 Windows 节点的 Kubernetes 集群的计划。
说明: 在本文中,当我们讨论 Windows 容器时,我们所指的是具有进程隔离能力的 Windows
容器。具有 Hyper-V 隔离能力
的 Windows 容器计划在将来发行版本中推出。
支持的功能与局限性
支持的功能
Windows 操作系统版本支持
参考下面的表格,了解 Kubernetes 中支持的 Windows 操作系统。
同一个异构的 Kubernetes 集群中可以同时包含 Windows 和 Linux 工作节点。
Windows 容器仅能调度到 Windows 节点,Linux 容器则只能调度到 Linux 节点。
Kubernetes 版本
Windows Server LTSC 版本
Windows Server SAC 版本
Kubernetes v1.14
Windows Server 2019
Windows Server ver 1809
Kubernetes v1.15
Windows Server 2019
Windows Server ver 1809
Kubernetes v1.16
Windows Server 2019
Windows Server ver 1809
Kubernetes v1.17
Windows Server 2019
Windows Server ver 1809
Kubernetes v1.18
Windows Server 2019
Windows Server ver 1809, Windows Server ver 1903, Windows Server ver 1909
Pod 是 Kubernetes 中最基本的构造模块,是 Kubernetes 对象模型中你可以创建或部署的
最小、最简单元。你不可以在同一 Pod 中部署 Windows 和 Linux 容器。
Pod 中的所有容器都会被调度到同一节点(Node),而每个节点代表的是一种特定的平台
和体系结构。Windows 容器支持 Pod 的以下能力、属性和事件:
Windows 支持五种不同的网络驱动/模式:二层桥接(L2bridge)、二层隧道(L2tunnel)、
覆盖网络(Overlay)、透明网络(Transparent)和网络地址转译(NAT)。
在一个包含 Windows 和 Linux 工作节点的异构集群中,你需要选择一种对 Windows 和
Linux 兼容的联网方案。下面是 Windows 上支持的一些树外插件及何时使用某种
CNI 插件的建议:
网络驱动
描述
容器报文修改
网络插件
网络插件特点
L2bridge
容器挂接到外部 vSwitch 上。容器挂接到下层网络之上,但由于容器的 MAC 地址在入站和出站时被重写,物理网络不需要这些地址。
MAC 地址被重写为宿主系统的 MAC 地址,IP 地址也可能依据 HNS OutboundNAT 策略重写为宿主的 IP 地址。
当(比如出于安全原因)期望虚拟容器网络与下层宿主网络隔离时,应该使用 win-overlay。如果你的数据中心可用 IP 地址受限,覆盖网络允许你在不同的网络中复用 IP 地址(每个覆盖网络有不同的 VNID 标签)。这一选项要求在 Windows Server 2009 上安装 KB4489899 补丁。
对 Windows 而言,在 Kubernetes 中使用 IPv6 需要
Windows Server vNext Insider Preview Build 19603 或更高版本。
目前 Windows 上的覆盖网络(VXLAN)还不支持双协议栈联网。
局限性
控制面
在 Kubernetes 架构和节点阵列中仅支持将 Windows 作为工作节点使用。
这意味着 Kubernetes 集群必须总是包含 Linux 主控节点,零个或者多个 Linux
工作节点以及零个或者多个 Windows 工作节点。
计算
资源管理与进程隔离
Linux 上使用 Linux 控制组(CGroups)作为 Pod 的边界,以实现资源控制。
容器都创建于这一边界之内,从而实现网络、进程和文件系统的隔离。
控制组 CGroups API 可用来收集 CPU、I/O 和内存的统计信息。
与此相比,Windows 为每个容器创建一个带有系统名字空间过滤设置的 Job 对象,
以容纳容器中的所有进程并提供其与宿主系统间的逻辑隔离。
没有现成的名字空间过滤设置是无法运行 Windows 容器的。
这也意味着,系统特权无法在宿主环境中评估,因而 Windows 上也就不存在特权容器。
归咎于独立存在的安全账号管理器(Security Account Manager,SAM),容器也不能
获得宿主系统上的任何身份标识。
操作系统限制
Windows 有着严格的兼容性规则,宿主 OS 的版本必须与容器基准镜像 OS 的版本匹配。
目前仅支持容器操作系统为 Windows Server 2019 的 Windows 容器。
对于容器的 Hyper-V 隔离、允许一定程度上的 Windows 容器镜像版本向后兼容性等等,
都是将来版本计划的一部分。
功能特性限制
终止宽限期(Termination Grace Period):未实现
单文件映射:将用 CRI-ContainerD 来实现
终止消息(Termination message):将用 CRI-ContainerD 来实现
特权容器:Windows 容器当前不支持
巨页(Huge Pages):Windows 容器当前不支持
现有的节点问题探测器(Node Problem Detector)仅适用于 Linux,且要求使用特权容器。
一般而言,我们不设想此探测器能用于 Windows 节点,因为 Windows 不支持特权容器。
并非支持共享名字空间的所有功能特性(参见 API 节以了解详细信息)
内存预留与处理
Windows 不像 Linux 一样有一个内存耗尽(Out-of-memory)进程杀手(Process
Killer)机制。Windows 总是将用户态的内存分配视为虚拟请求,页面文件(Pagefile)
是必需的。这一差异的直接结果是 Windows 不会像 Linux 那样出现内存耗尽的状况,
系统会将进程内存页面写入磁盘而不会因内存耗尽而终止进程。
当内存被过量使用且所有物理内存都被用光时,系统的换页行为会导致性能下降。
Windows 宿主联网服务和虚拟交换机实现了名字空间隔离,可以根据需要为 Pod 或容器
创建虚拟的网络接口(NICs)。不过,很多类似 DNS、路由、度量值之类的配置数据都
保存在 Windows 注册表数据库中而不是像 Linux 一样保存在 /etc/... 文件中。
Windows 为容器提供的注册表与宿主系统的注册表是分离的,因此类似于将 /etc/resolv.conf
文件从宿主系统映射到容器中的做法不会产生与 Linux 系统相同的效果。
这些信息必须在容器内部使用 Windows API 来配置。
因此,CNI 实现需要调用 HNS,而不是依赖文件映射来将网络细节传递到 Pod
或容器中。
Windows 节点不支持以下联网功能:
Windows Pod 不能使用宿主网络模式
从节点本地访问 NodePort 会失败(但从其他节点或外部客户端可访问)
Windows Server 的未来版本中会支持从节点访问服务的 VIPs
kube-proxy 的覆盖网络支持是 Alpha 特性。此外,它要求在 Windows Server 2019 上安装
KB4482887 补丁
本地流量策略和 DSR(保留目标地址)模式
连接到 l2bridge、l2tunnel 或覆盖网络的 Windows 容器不支持使用 IPv6 协议栈通信。
要使得这些网络驱动能够支持 IPv6 地址需要在 Windows 平台上开展大量的工作,
还需要在 Kubernetes 侧修改 kubelet、kube-proxy 以及 CNI 插件。
不支持 DNS 的 ClusterFirstWithHostNet 配置。Windows 将所有包含 “.” 的名字
视为全限定域名(FQDN),因而不会对其执行部分限定域名(PQDN)解析。
在 Linux 上,你可以有一个 DNS 后缀列表供解析部分限定域名时使用。
在 Windows 上,我们只有一个 DNS 后缀,即与该 Pod 名字空间相关联的 DNS
后缀(例如 mydns.svc.cluster.local)。
Windows 可以解析全限定域名、或者恰好可用该后缀来解析的服务名称。
例如,在 default 名字空间中生成的 Pod 会获得 DNS 后缀
default.svc.cluster.local。在 Windows Pod 中,你可以解析
kubernetes.default.svc.cluster.local 和 kubernetes,但无法解析二者
之间的形式,如 kubernetes.default 或 kubernetes.default.svc。
在 Windows 上,可以使用的 DNS 解析程序有很多。由于这些解析程序彼此之间
会有轻微的行为差别,建议使用 Resolve-DNSName 工具来完成名字查询解析。
IPv6
Windows 上的 Kubernetes 不支持单协议栈的“只用 IPv6”联网选项。
不过,系统支持在 IPv4/IPv6 双协议栈的 Pod 和节点上运行单协议家族的服务。
更多细节可参阅 IPv4/IPv6 双协议栈联网一节。
会话亲和性
不支持使用 service.spec.sessionAffinityConfig.clientIP.timeoutSeconds 来为
Windows 服务设置最大会话粘滞时间。
安全性
Secret 以明文形式写入节点的卷中(而不是像 Linux 那样写入内存或 tmpfs 中)。
这意味着客户必须做以下两件事:
退出代码遵从相同的习惯,0 表示成功,非 0 值表示失败。
特定的错误代码在 Windows 和 Linux 上可能会不同。不过,从 Kubernetes 组件
(kubelet、kube-proxy)所返回的退出代码是没有变化的。
V1.Container
v1.Container.ResourceRequirements.limits.cpu 和 v1.Container.ResourceRequirements.limits.memory - Windows
不对 CPU 分配设置硬性的限制。与之相反,Windows 使用一个份额(share)系统。
基于毫核(millicores)的现有字段值会被缩放为相对的份额值,供 Windows 调度器使用。
参见 kuberuntime/helpers_windows.go 和
Microsoft 文档中关于资源控制的部分。
Windows 容器运行时中没有实现巨页支持,因此相关特性不可用。
巨页支持需要判定用户的特权
而这一特性无法在容器级别配置。
在一个 Kubernetes Pod 中,一个基础设施容器,或称 "pause" 容器,会被首先创建出来,
用以托管容器端点。属于同一 Pod 的容器,包括基础设施容器和工作容器,会共享相同的
网络名字空间和端点(相同的 IP 和端口空间)。我们需要 pause 容器来工作容器崩溃或
重启的状况,以确保不会丢失任何网络配置。
说明: 由于当前平台对 Windows 网络堆栈的限制,Windows 容器主机无法访问在其上调度的服务的 IP。只有 Windows pods 才能访问服务 IP。
使用可配置的容器用户名
从 Kubernetes v1.16 开始,可以为 Windows 容器配置与其镜像默认值不同的用户名来运行其入口点和进程。
此能力的实现方式和 Linux 容器有些不同。
在此处可了解更多信息。
使用组托管服务帐户管理工作负载身份
从 Kubernetes v1.14 开始,可以将 Windows 容器工作负载配置为使用组托管服务帐户(GMSA)。
组托管服务帐户是 Active Directory 帐户的一种特定类型,它提供自动密码管理,
简化的服务主体名称(SPN)管理以及将管理委派给跨多台服务器的其他管理员的功能。
配置了 GMSA 的容器可以访问外部 Active Directory 域资源,同时携带通过 GMSA 配置的身份。
在此处了解有关为 Windows 容器配置和使用 GMSA 的更多信息。
污点和容忍度
目前,用户需要将 Linux 和 Windows 工作负载运行在各自特定的操作系统的节点上,
因而需要结合使用污点和节点选择算符。 这可能仅给 Windows 用户造成不便。
推荐的方法概述如下,其主要目标之一是该方法不应破坏与现有 Linux 工作负载的兼容性。
确保特定操作系统的工作负载落在适当的容器主机上
用户可以使用污点和容忍度确保 Windows 容器可以调度在适当的主机上。目前所有 Kubernetes 节点都具有以下默认标签:
kubernetes.io/os = [windows|linux]
kubernetes.io/arch = [amd64|arm64|...]
如果 Pod 规范未指定诸如 "kubernetes.io/os": windows 之类的 nodeSelector,则该 Pod
可能会被调度到任何主机(Windows 或 Linux)上。
这是有问题的,因为 Windows 容器只能在 Windows 上运行,而 Linux 容器只能在 Linux 上运行。
最佳实践是使用 nodeSelector。
但是,我们了解到,在许多情况下,用户都有既存的大量的 Linux 容器部署,以及一个现成的配置生态系统,
例如社区 Helm charts,以及程序化 Pod 生成案例,例如 Operators。
在这些情况下,您可能会不愿意更改配置添加 nodeSelector。替代方法是使用污点。
由于 kubelet 可以在注册期间设置污点,因此可以轻松修改它,使其仅在 Windows 上运行时自动添加污点。
例如:--register-with-taints='os=windows:NoSchedule'
向所有 Windows 节点添加污点后,Kubernetes 将不会在它们上调度任何负载(包括现有的 Linux Pod)。
为了使某 Windows Pod 调度到 Windows 节点上,该 Pod 既需要 nodeSelector 选择 Windows,
也需要合适的匹配的容忍度设置。
kubectl get node kubernetes-minion-9vlv --show-labels
NAME STATUS AGE VERSION LABELS
kubernetes-minion-9vlv Ready 22m v1.6.0+fff5156 beta.kubernetes.io/instance-type=n1-standard-2,topology.kubernetes.io/region=us-central1,topology.kubernetes.io/zone=us-central1-a,kubernetes.io/hostname=kubernetes-minion-9vlv
[1]: 用来连接到集群的不同 IP 或 DNS 名
(就像 kubeadm 为负载均衡所使用的固定
IP 或 DNS 名,kubernetes、kubernetes.default、kubernetes.default.svc、
kubernetes.default.svc.cluster、kubernetes.default.svc.cluster.local)。