Kubernetes master node's date was updated. Certifactes have now expired?

8/3/2018

I had an incorrect date set (by a few years) I've modified this but now I'm getting errors with some pods:

kube-controller-manager-master

E0803 01:06:31.311871 1 leaderelection.go:234] error retrieving resource lock kube-system/kube-controller-manager: Get https://192.168.0.33:6443/api/v1/namespaces/kube-system/endpoints/kube-controller-manager: x509: certificate has expired or is not yet valid

kube-scheduler-master

E0803 01:06:24.507668 1 reflector.go:205] k8s.io/kubernetes/vendor/k8s.io/client-go/informers/factory.go:130: Failed to list *v1.StorageClass: Get https://192.168.0.33:6443/apis/storage.k8s.io/v1/storageclasses?limit=500&resourceVersion=0: x509: certificate has expired or is not yet valid E0803 01:06:24.511785 1 reflector.go:205] k8s.io/kubernetes/vendor/k8s.io/client-go/informers/factory.go:130: Failed to list *v1beta1.ReplicaSet: Get https://192.168.0.33:6443/apis/extensions/v1beta1/replicasets?limit=500&resourceVersion=0: x509: certificate has expired or is not yet valid E0803 01:06:24.532539 1 reflector.go:205] k8s.io/kubernetes/vendor/k8s.io/client-go/informers/factory.go:130: Failed to list *v1.Node: Get https://192.168.0.33:6443/api/v1/nodes?limit=500&resourceVersion=0: x509: certificate has expired or is not yet valid E0803 01:06:24.543719 1 reflector.go:205] k8s.io/kubernetes/vendor/k8s.io/client-go/informers/factory.go:130: Failed to list *v1beta1.PodDisruptionBudget: Get https://192.168.0.33:6443/apis/policy/v1beta1/poddisruptionbudgets?limit=500&resourceVersion=0: x509: certificate has expired or is not yet valid E0803 01:06:24.547678 1 reflector.go:205] k8s.io/kubernetes/vendor/k8s.io/client-go/informers/factory.go:130: Failed to list *v1.ReplicationController: Get https://192.168.0.33:6443/api/v1/replicationcontrollers?limit=500&resourceVersion=0: x509: certificate has expired or is not yet valid E0803 01:06:24.554880 1 reflector.go:205] k8s.io/kubernetes/vendor/k8s.io/client-go/informers/factory.go:130: Failed to list *v1.PersistentVolume: Get https://192.168.0.33:6443/api/v1/persistentvolumes?limit=500&resourceVersion=0: x509: certificate has expired or is not yet valid E0803 01:06:24.559708 1 reflector.go:205] k8s.io/kubernetes/cmd/kube-scheduler/app/server.go:176: Failed to list *v1.Pod: Get https://192.168.0.33:6443/api/v1/pods?fieldSelector=status.phase%21%3DFailed%2Cstatus.phase%21%3DSucceeded&limit=500&resourceVersion=0: x509: certificate has expired or is not yet valid

How could I fix this?

-- Chris Stryczynski
kubernetes

1 Answer

8/3/2018

One solution was to delete the whole cluster and start again, which I had to do now...

-- Chris Stryczynski
Source: StackOverflow