k3s certificate expired Solution

Discover the test k3s use of https tls hand error appeared a year later, to re-generate the certificate does not work, can only repair reinstall k3s source compiler
environment: Ubuntu 16.04
Docker 18.06.3

First, install git (the default should already be installed if not please execute the following command)
sudo APT -y install git

Two, clone source, and switching branch (here I use the v1.0.1 version)
git clone https://github.com/rancher/k3s.git
cd k3s
git Checkout -b v1.0.1

Third, modify the source code in the certificate section
mainly three documents, modify Figure
1. The first file
vendor / github.com / rancher / dynamiclistener / cert / cert.go
k3s certificate expired Solution
k3s certificate expired Solution
k3s certificate expired Solution
official fixes the following 100 years, although it did not say like effect

2. The second file vendor / github.com / rancher / dynamiclistener / factory / cert_utils.go

k3s certificate expired Solution
k3s certificate expired Solution

3. Third file scripts / version.sh, because the file will check value sha, comment lines 4-7
k3s certificate expired Solution

Fourth, the compiler (ensure network, because it is compiled with docker)
1. Install the make
APT the install the make -Y

2. Direct the make command, compile a long time please be patient

3. Complete all of the files in the dist / artifacts

V. verify
reinstall k3s (please refer to the mounting portion k3s installation), if the official off-line package with a small bug here about the need to tag Image
Docker tag k8s.gcr.io/pause:3.1 Rancher / PAUSE: 3.1

Verification of results
k3s certificate expired Solution

k3s certificate expired Solution

At this point you can feel at ease with the 100 years, do not have to upgrade every year, of course, the same recommendations and the official upgrade once a year, after all, more loopholes

Guess you like

Origin blog.51cto.com/3138583/2466781