30 KiB
TODO: This document was manually maintained so might be incomplete. The automation effort is tracked in https://github.com/kubernetes/test-infra/issues/5843.
Changes in k8s.io/api and k8s.io/apimachinery are mentioned here
because k8s.io/client-go depends on them.
v8.0.0
Breaking Changes:
-
KUBE_API_VERSIONShas been removed. -
The client-go/discovery
RESTMapperhas been moved to client-go/restmapper. -
CachedDiscoveryClienthas been moved from kubectl to client-go. -
The
EventRecorderinterface is changed to include anAnnotatedEventfmethod, which can add annotations to an event. -
[k8s.io/apimachinery] The deprecated
RepairMalformedUpdatesflag has been removed.
New Features:
-
A new easy-to-use dynamic client is added and the old dynamic client is now deprecated.
-
client-go and kubectl now detect and report an error on duplicated name for user, cluster and context, while loading the kubeconfig.
-
The informer code-generator now allows specifying a custom resync period for certain informer types and uses the default resync period if none is specified.
-
Exec authenticator plugin now supports TLS client certificates.
-
The discovery client now has a default request timeout of 32 seconds.
-
The OpenStack auth config from is now read from the client config. If the client config is not available, it falls back to reading from the environment variables.
-
The in-tree support for openstack credentials is now deprecated. Please use the
client-keystone-authfrom the cloud-provider-openstack repository. Details on how to use this new capability is documented here
Bug fixes and Improvements:
-
406 mime-type errors are now tolerated while attempting to load new openapi schema. This improves compatibility with older servers when creating/updating API objects.
-
Removes the generated
DeleteCollection()method forServicessince the API does not support it. -
Event object references with apiversion now report an apiversion, instead of just the group.
-
[k8s.io/apimachinery]
runtime.Unstructured.UnstructuredContent()no longer mutates the source while returning the contents. -
[k8s.io/apimachinery] Incomplete support for
uint64is now removed. This fixes a panic encountered while usingDeepCopyJSONwithuint64. -
[k8s.io/apimachinery] API server can now parse
propagationPolicywhen it sent as a query parameter sent with a delete request. -
[k8s.io/apimachinery] APIServices with kube-like versions (e.g. v1, v2beta1, etc.) will be sorted appropriately within each group.
-
[k8s.io/apimachinery]
int64is the only allowed integer for printers.
API changes
Breaking Changes:
-
Support for
alpha.kubernetes.io/nvidia-gpuresource which was deprecated in 1.10 is removed. Please use the resource exposed byDevicePluginsinstead (nvidia.com/gpu). -
Alpha annotation for
PersistentVolumenode affinity has been removed. Update yourPersistentVolumes to use the betaPersistentVolume.nodeAffinityfield before upgrading. -
ObjectMetaListOptionsDeleteOptionsare removed from the core api group. Please use the ones inmeta/v1instead. -
ExternalIDinNodeSpecis deprecated. The externalID of the node is no longer set in the Node spec. -
PSP-related types in the
extensions/v1beta1API group are now deprecated. It is suggested to use thepolicy/v1beta1API group instead.
New Features:
-
PodSecurityPolicynow supports restricting hostPath volume mounts to be readOnly and under specific path prefixes. -
Node.Spec.ConfigSource.ConfigMap.KubeletConfigKeymust be specified when using dynamic Kubelet config to tell the Kubelet which key of theConfigMapidentifies its config file. -
serverAddressByClientCIDRsinmeta/v1APIGroup is now optional. -
A new field
MatchFieldsis added toNodeSelectorTerm. Currently, it only supportsmetadata.name. -
The
PriorityClassAPI is promoted toscheduling.k8s.io/v1beta1. -
The status of dynamic Kubelet config is now reported via
Node.Status.Config, rather than theKubeletConfigOknode condition. -
The
GitRepovolume type is deprecated. To provision a container with a git repo, mount anEmptyDirinto anInitContainerthat clones the repo using git, then mount theEmptyDirinto the Pod's container. -
The Sysctls experimental feature has been promoted to beta (enabled by default via the
Sysctlsfeature flag).PodSecurityPolicyandPodobjects now have fields for specifying and controlling sysctls. Alpha sysctl annotations will be ignored by 1.11+ kubelets. All alpha sysctl annotations in existing deployments must be converted to API fields to be effective. -
The annotation
service.alpha.kubernetes.io/tolerate-unready-endpointsis deprecated. Users should useService.spec.publishNotReadyAddressesinstead. -
VerticalPodAutoscalerhas been added toautoscaling/v1API group. -
Alpha support is added for dynamic volume limits based on node type.
-
ContainersReadycondition is added to the Pod status.
Bug fixes and Improvements:
-
Default mount propagation has changed from
HostToContainer(rslavein Linux terminology) toNone(private) to match the behavior in 1.9 and earlier releases.HostToContaineras a default caused regressions in some pods.
v7.0.0
Breaking Changes:
-
Google Cloud Service Account email addresses can now be used in RBAC Role bindings since the default scopes now include the
userinfo.emailscope. This is a breaking change if the numeric uniqueIDs of the Google service accounts were being used in RBAC role bindings. The behavior can be overridden by explicitly specifying the scope values as comma-separated string in theusers[*].config.scopesfield in theKUBECONFIGfile. -
[k8s.io/api] The
ConfigOKnode condition has been renamed toKubeletConfigOk.
New Features:
-
Subresource support is added to the dynamic client.
-
A watch method is added to the Fake Client.
-
ListOptionscan be modified when creating aListWatch. -
A
/tokensubresource for ServiceAccount is added. -
If an informer delivery fails, the particular notification is skipped and continued the next time.
-
Certificate manager will no longer wait until the initial rotation succeeds or fails before returning from
Start(). -
[k8s.io/api]
VolumeSchedulingandLocalPersistentVolumefeatures are beta and enabled by default. The PersistentVolume NodeAffinity alpha annotation is deprecated and will be removed in a future release. -
[k8s.io/api] The
PodSecurityPolicyAPI has been moved to thepolicy/v1beta1API group. ThePodSecurityPolicyAPI in theextensions/v1beta1API group is deprecated and will be removed in a future release. -
[k8s.io/api] ConfigMap objects now support binary data via a new
binaryDatafield. -
[k8s.io/api] Service account TokenRequest API is added.
-
[k8s.io/api] FSType is added in CSI volume source to specify filesystems.
-
[k8s.io/api] v1beta1 VolumeAttachment API is added.
-
[k8s.io/api]
v1.Podnow has a fieldShareProcessNamespaceto configure whether a single process namespace should be shared between all containers in a pod. This feature is in alpha preview. -
[k8s.io/api] Add
NominatedNodeNamefield toPodStatus. This field is set when a pod preempts other pods on the node. -
[k8s.io/api] Promote
CSIPersistentVolumeSource to beta. -
[k8s.io/api] Promote
DNSPolicyandDNSConfiginPodSpecto beta. -
[k8s.io/api] External metric types are added to the HPA API.
-
[k8s.io/apimachinery] The
meta.k8s.io/v1alpha1objects for retrieving tabular responses from the server (Table) or fetching just theObjectMetafor an object (asPartialObjectMetadata) are now beta as part ofmeta.k8s.io/v1beta1. Clients may request alternate representations of normal Kubernetes objects by passing anAcceptheader likeapplication/json;as=Table;g=meta.k8s.io;v=v1beta1orapplication/json;as=PartialObjectMetadata;g=meta.k8s.io;v1=v1beta1. Older servers will ignore this representation or return an error if it is not available. Clients may request fallback to the normal object by adding a non-qualified mime-type to theirAcceptheader likeapplication/json- the server will then respond with either the alternate representation if it is supported or the fallback mime-type which is the normal object response.
Bug fixes and Improvements:
-
Port-forwarding of TCP6 ports is fixed.
-
A race condition in SharedInformer that could violate the sequential delivery guarantee and cause panics on shutdown is fixed.
-
[k8s.io/api] PersistentVolume flexVolume sources can now reference secrets in a namespace other than the PersistentVolumeClaim's namespace.
-
[k8s.io/apimachinery] YAMLDecoder Read can now return the number of bytes read.
-
[k8s.io/apimachinery] YAMLDecoder Read now tracks rest of buffer on
io.ErrShortBuffer. -
[k8s.io/apimachinery] Prompt required merge key in the error message while applying a strategic merge patch.
v6.0.0
Breaking Changes:
-
If you upgrade your client-go libs and use the
AppsV1() or Apps()interface, please note that the default garbage collection behavior is changed. -
Swagger 1.2 retriever
DiscoveryClient.SwaggerSchemawas removed from the discovery client -
Informers got a NewFilteredSharedInformerFactory to e.g. filter by namespace
-
[k8s.io/api] The dynamic admission webhook is split into two kinds, mutating and validating. The kinds have changed completely and old code must be ported to
admissionregistration.k8s.io/v1beta1-MutatingWebhookConfigurationandValidatingWebhookConfiguration -
[k8s.io/api] Renamed
core/v1.ScaleIOVolumeSourcetoScaleIOPersistentVolumeSource -
[k8s.io/api] Renamed
core/v1.RBDVolumeSourcetoRBDPersistentVolumeSource -
[k8s.io/api] Removed
core/v1.CreatedByAnnotation -
[k8s.io/api] Renamed
core/v1.StorageMediumHugepagestoStorageMediumHugePages -
[k8s.io/api]
core/v1.Taint.TimeAddedbecame a pointer -
[k8s.io/api]
core/v1.DefaultHardPodAffinitySymmetricWeighttype changed from int to int32 -
[k8s.io/apimachinery]
ObjectCopierinterface was removed (requires switch to new generators with DeepCopy methods)
New Features:
-
Certificate manager was moved from kubelet to
k8s.io/client-go/util/certificates -
[k8s.io/api] Workloads api types are promoted to
apps/v1version -
[k8s.io/api] Added
storage.k8s.io/v1alpha1API group -
[k8s.io/api] Added support for conditions in StatefulSet status
-
[k8s.io/api] Added support for conditions in DaemonSet status
-
[k8s.io/apimachinery] Added polymorphic scale client in
k8s.io/client-go/scale, which supports scaling of resources in arbitrary API groups -
[k8s.io/apimachinery]
meta.MetadataAccessorgot API chunking support -
[k8s.io/apimachinery]
unstructured.Unstructuredgot getters and setters
Bug fixes and Improvements:
-
The body in glog output is not truncated with log level 10
-
[k8s.io/api] Unset
creationTimestampfield is output as null if encoded from an unstructured object -
[k8s.io/apimachinery] Redirect behavior is restored for proxy subresources
-
[k8s.io/apimachinery] Random string generation functions are optimized
v5.0.1
Bug fix: picked up a security fix kubernetes/kubernetes#53443 for PodSecurityPolicy.
v5.0.0
New features:
-
Added paging support
-
Added support for client-side spam filtering of events
-
Added support for http etag and caching
-
Added priority queue support to informer cache
-
Added openstack auth provider
-
Added metrics for checking reflector health
-
Client-go now includes the leaderelection package
API changes:
-
Promoted Autoscaling v2alpha1 to v2beta1
-
Promoted CronJobs to batch/v1beta1
-
Promoted rbac.authorization.k8s.io/v1beta1 to rbac.authorization.k8s.io/v1
-
Added a new API version apps/v1beta2
-
Added a new API version scheduling/v1alpha1
Breaking changes:
-
Moved pkg/api and pkg/apis to k8s.io/api. Other kubernetes repositories also import types from there, so they are composable with client-go.
-
Removed helper functions in pkg/api and pkg/apis. They are planned to be exported in other repos. The issue is tracked here. During the transition, you'll have to copy the helper functions to your projects.
-
The discovery client now fetches the protobuf encoded OpenAPI schema and returns
openapi_v2.Document -
Enforced explicit references to API group client interfaces in clientsets to avoid ambiguity.
-
The generic RESTClient type (
k8s.io/client-go/rest) no longer exposesLabelSelectorParamorFieldSelectorParammethods - useVersionedParamswithmetav1.ListOptionsinstead. TheUintParammethod has been removed. Thetimeoutparameter will no longer cause an error when usingParam().
v4.0.0
No significant changes since v4.0.0-beta.0.
v4.0.0-beta.0
New features:
-
Added OpenAPISchema support in the discovery client
-
Added mutation cache filter: MutationCache is able to take the result of update operations and stores them in an LRU that can be used to provide a more current view of a requested object.
-
Moved the remotecommand package (used by
kubectl exec/attach) to client-go -
Added support for following redirects to the SpdyRoundTripper
-
Added Azure Active Directory plugin
Usability improvements:
-
Added several new examples and reorganized client-go/examples
API changes:
-
Added networking.k8s.io/v1 API
-
ControllerRevision type added for StatefulSet and DaemonSet history.
-
Added support for initializers
-
Added admissionregistration.k8s.io/v1alpha1 API
Breaking changes:
-
Moved client-go/util/clock to apimachinery/pkg/util/clock
-
Some API helpers were removed.
-
Dynamic client takes GetOptions as an input parameter
Bug fixes:
-
PortForwarder: don't log an error if net.Listen fails. https://github.com/kubernetes/kubernetes/pull/44636
-
oidc auth plugin not to override the Auth header if it's already exits. https://github.com/kubernetes/kubernetes/pull/45529
-
The --namespace flag is now honored for in-cluster clients that have an empty configuration. https://github.com/kubernetes/kubernetes/pull/46299
-
GCP auth plugin no longer overwrites existing Authorization headers. https://github.com/kubernetes/kubernetes/pull/45575
v3.0.0
Bug fixes:
- Use OS-specific libs when computing client User-Agent in kubectl, etc. (https://github.com/kubernetes/kubernetes/pull/44423)
- kubectl commands run inside a pod using a kubeconfig file now use the namespace specified in the kubeconfig file, instead of using the pod namespace. If no kubeconfig file is used, or the kubeconfig does not specify a namespace, the pod namespace is still used as a fallback. (https://github.com/kubernetes/kubernetes/pull/44570)
- Restored the ability of kubectl running inside a pod to consume resource files specifying a different namespace than the one the pod is running in. (https://github.com/kubernetes/kubernetes/pull/44862)
v3.0.0-beta.0
- Added dependency on k8s.io/apimachinery. The impacts include changing import path of API objects like
ListOptionsfromk8s.io/client-go/pkg/api/v1tok8s.io/apimachinery/pkg/apis/meta/v1. - Added generated listers (listers/) and informers (informers/)
- Kubernetes API changes:
- Added client support for:
- authentication/v1
- authorization/v1
- autoscaling/v2alpha1
- rbac/v1beta1
- settings/v1alpha1
- storage/v1
- Changed client support for:
- certificates from v1alpha1 to v1beta1
- policy from v1alpha1 to v1beta1
- Deleted client support for:
- extensions/v1beta1#Job
- Added client support for:
- CHANGED: pass typed options to dynamic client (https://github.com/kubernetes/kubernetes/pull/41887)
v2.0.0
- Included bug fixes in k8s.io/kuberentes release-1.5 branch, up to commit bde8578d9675129b7a2aa08f1b825ec6cc0f3420
v2.0.0-alpha.1
- Removed top-level version folder (e.g., 1.4 and 1.5), switching to maintaining separate versions in separate branches.
- Clientset supported multiple versions per API group
- Added ThirdPartyResources example
- Kubernetes API changes
- Apps API group graduated to v1beta1
- Policy API group graduated to v1beta1
- Added support for batch/v2alpha1/cronjob
- Renamed PetSet to StatefulSet
v1.5.0
- Included the auth plugin (https://github.com/kubernetes/kubernetes/pull/33334)
- Added timeout field to RESTClient config (https://github.com/kubernetes/kubernetes/pull/33958)