[2020-02-28T20:11:41Z ERROR krustlet::node] Failed to create lease: ApiError BadRequest ("Lease in version \"v1\" cannot be handled as a Lease: v1.Lease.Spec: v1.LeaseSpec.RenewTime: unmarshalerDecoder: parsing time \"2020-02-28T20:11:41.636526400Z\" as \"2006-01-02T15:04:05.000000Z07:00\": cannot parse \"400Z\" as \"Z07:00\", error found in #10 byte of ...|36526400Z\"}}|..., bigger context ...|\":300,\"renewTime\":\"2020-02-28T20:11:41.636526400Z\"}}|...")
[2020-02-28T20:11:41Z INFO krustlet::server] starting webserver at: V4(0.0.0.0:3000)
[2020-02-28T20:11:42Z ERROR krustlet::node] Failed to create lease: ApiError NotFound ("leases.coordination.k8s.io \"krustlet\" not found")```
It appears that the bug is in Kubernetes. The Go RFC 3339 Micro format is
2006-01-02T15:04:05.999999999Z07:00, while the Kubernetes RFC 3339 Nano format is2006-01-02T15:04:05.000000Z07:00.However, it will take a very long time for that change to make it into Kubernetes if they even decide to accept it. So probably changing the
k8s-openapiproject is a better bet.I’m going to file an issue in Kubernetes anyway, since it does seem to be a relevant issue for them to consider.
I’ll file a bug upstream on
k8s-openapi, but I think we should probably manually serialize the lease spec until that fix is made.