K3S
To prepare
There is no official introduction of these, here is preparation according to k8s :(there are no problems after these installation)
Disabling the Firewall
systemctl stop firewalld
systemctl disable firewalld
Copy the code
Close the selinux
Sed -i 's/enforcing/disabled/' /etc/selinux/configCopy the code
Close the swap
Sed -ri 's/.*swap.*/#&/' /etc/fstabCopy the code
More planned host names
hostnamectl set-hostname <hostname>
Copy the code
Add hosts to master
Cat >> /etc/hosts << EOF 192.168.72.100 master 192.168.72.101 node1 192.168.72.102 node2 EOFCopy the code
Time synchronization
yum install ntpdate -y
ntpdate time.windows.com
Copy the code
The chain that Bridges ipv4 traffic to iptables (not used in this case k3s)
cat > /etc/sysctl.d/k8s.conf << EOF net.bridge.bridge-nf-call-ip6tables = 1 net.bridge.bridge-nf-call-iptables = 1 EOF # Effective sysctl - systemCopy the code
The official documentation
Documents: www.rancher.cn/k3s/
A prerequisite for
-
Two nodes cannot have the same host name
-
If all your nodes have the same hostname, use the –with-node-id option to add a random suffix for each node, or design a unique name for each node you add to the cluster, passed with –node-name or $K3S_NODE_NAME
Option to use script installation
The service node (Master) is installed
As mentioned in the Quick Start guide, you can install K3s as a service on Systemd and OpenRC based systems using the installation scripts provided with get.k3s. IO.
The simplest form of this command is as follows:
curl -sfL https://get.k3s.io | sh -
Copy the code
Domestic users can use the following methods to speed up installation:
curl -sfL http://rancher-mirror.cnrancher.com/k3s/k3s-install.sh | INSTALL_K3S_MIRROR=cn INSTALL_K3S_VERSION = v1.20.4 + k3s1 K3S_NODE_NAME = k3s - server sh -Copy the code
When installing K3s using this method, the following environment variables can be used to configure the installation:
INSTALL_K3S_VERSION=v1.20.4+ k3S1: Download the K3s version from Github. If not specified, the download will be attempted from the “Stable” channel.
K3S_NODE_NAME=k3sserver: node name
After running this installation: THE K3s service will be configured to restart automatically after the node restarts or if the process crashes or is killed. Will install other utilities, including kubectl, crictl, CTR, k3s – killall. Sh and k3s – uninstall. Sh kubeconfig file written to the/etc/rancher/k3s/k3s yaml, Kubectl installed by K3s will use this file automatically
Agent Installation (Not installed)
To install them on the working node and add them to the cluster, run the installation script using the K3S_URL and K3S_TOKEN environment variables. Here is an example showing how to join a worker node:
curl -sfL https://get.k3s.io | K3S_URL=https://myserver:6443 K3S_TOKEN=mynodetoken sh -
Copy the code
Domestic users can use the following methods to speed up installation:
curl -sfL http://rancher-mirror.cnrancher.com/k3s/k3s-install.sh | INSTALL_K3S_MIRROR=cn K3S_URL=https://myserver:6443 K3S_TOKEN=mynodetoken sh -
Copy the code
Setting the K3S_URL parameter causes K3s to run in worker mode. The K3s Agent will register with the listening K3s server at the URL provided. K3S_TOKEN value used to store on your server node/var/lib/rancher/k3s/server/node – token
Note: Each computer must have a unique hostname. If your computer does not have a unique hostname, pass the K3S_NODE_NAME environment variable and provide a valid and unique hostname for each node.
Uninstall K3s
To uninstall K3s from the Server node, run:
/usr/local/bin/k3s-uninstall.sh
Copy the code
To uninstall K3s from the Agent node, run:
/usr/local/bin/k3s-agent-uninstall.sh
Copy the code
The problem record
bad certificate
3月 30 16:26:58 CS100 k3s[54269]: Time ="2021-03-30T16:26:58.109836738+08:00" level=info MSG ="Waiting for Control-plane node agent startup" 3月 30 16:26:58 cs100 k3s[54269]: Time ="2021-03-30T16:26:58.115678978+08:00" level=info MSG =" cluster-http-server 2021/03/30 16:26:58 Http: TLS Handshake error from 127.0.0.1:38956: remote error: TLS: Bad Certificate "3月 30 16:26:58 cs100 k3s[54269]: Time ="2021-03-30T16:26:58.117326829+08:00" level=error MSG ="CA Cert Validation failed: The Get \ "https://127.0.0.1:6443/cacerts\" : : x509 certificate signed by unknown authority "on March 30 16:26:58 cs100 k3s [54269] : Time ="2021-03-30T16:26:58.117391988+08:00" level=info MSG =" cluster-http-server 2021/03/30 16:26:58 Http: TLS Handshake error from 127.0.0.1:38958: remote error: TLS: Bad Certificate "3月 30 16:26:59 CS100 k3s[54269]: Time ="2021-03-30T16:26:59.110666035+08:00" level=info MSG ="Waiting for Control-plane node agent startup" 3月 30 16:27:00 cs100 k3s[54269]: Time ="2021-03-30T16:27:00.111257107+08:00" level=info MSG ="Waiting for Control-plane node agent startup" 3月 30 16:27:00 cs100 k3s[54269]: Time ="2021-03-30T16:27:00.119004212+08:00" level=info MSG =" cluster-http-server 2021/03/30 16:27:00 Http: TLS Handshake error from 127.0.0.1:38970: remote error: TLS: Bad Certificate "3月 30 16:27:00 cs100 k3s[54269]: Time ="2021-03-30T16:27:00.121197347+08:00" level=info MSG =" cluster-http-server 2021/03/30 16:27:00 Http: TLS Handshake error from 127.0.0.1:38972: remote error: TLS: Bad Certificate "3月 30 16:27:00 cs100 k3s[54269]: Time ="2021-03-30T16:27:00.121214978+08:00" level=error MSG ="CA Cert Validation failed: The Get \ "https://127.0.0.1:6443/cacerts\" : : x509 certificate signed by unknown authority "on March 30 16:27:01 cs100 k3s [54269] : Time ="2021-03-30T16:27:01.111804280+08:00" level=info MSG ="Waiting for Control-plane node agent startup"Copy the code
Solution: If you installed K3s using an installation script, a script to uninstall K3s is generated during the installation.
Uninstalling K3s will delete cluster data and all scripts. To restart the cluster with different installation options, re-run the installation script with a different flag.
Important: To restart the cluster with a different installation option, rerun the installation script with a different flag and do not reinstall the cluster with the previous node name after uninstallation
Docker Rancher2
Docker needs to be installed first
Pull the Rancher2 mirror
docker pull rancher/rancher
Copy the code
View rancher image details
docker inspect rancher/rancher:latest
Copy the code
We can see some useful environment variables Env, as well as data Volumes and other general parameters in Dockerfile construction. Obviously, rancher mirrors have two main volume directories, and the default is to use anonymous volumes. Next we use mount to the specified host directory for data volume persistence and start Rancher
[
{
"Id": "sha256:3ea53a0e3b90494e03d0e1ab35c7315bc2c24477fca00bd6e9aa4e39e254db4b",
"RepoTags": [
"rancher/rancher:latest"
],
"RepoDigests": [
"rancher/rancher@sha256:11437c76cc21ae31142882c7e46d2048865a8f4c7b53943a005c28fc75a7fa6e"
],
"Parent": "",
"Comment": "",
"Created": "2021-03-13T05:35:23.671078717Z",
"Container": "464616f8cb61cb702bd373cf3da57978d71d6a882feed3dcbd594443dfb09391",
"ContainerConfig": {
"Hostname": "464616f8cb61",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"CATTLE_SYSTEM_CHART_DEFAULT_BRANCH=release-v2.5",
"CATTLE_CHART_DEFAULT_BRANCH=release-v2.5",
"CATTLE_PARTNER_CHART_DEFAULT_BRANCH=main",
"CATTLE_HELM_VERSION=v2.16.8-rancher1",
"CATTLE_K3S_VERSION=v1.18.8+k3s1",
"CATTLE_MACHINE_VERSION=v0.15.0-rancher52",
"CATTLE_ETCD_VERSION=v3.4.3",
"CATTLE_CHANNELSERVER_VERSION=v0.5.0",
"LOGLEVEL_VERSION=v0.1.3",
"TINI_VERSION=v0.18.0",
"TELEMETRY_VERSION=v0.5.14",
"KUBECTL_VERSION=v1.19.7",
"DOCKER_MACHINE_LINODE_VERSION=v0.1.8",
"LINODE_UI_DRIVER_VERSION=v0.3.0",
"RANCHER_METADATA_BRANCH=release-v2.5",
"HELM_VERSION=v3.3.1",
"KUSTOMIZE_VERSION=v3.5.4",
"CATTLE_FLEET_MIN_VERSION=0.3.400",
"CATTLE_RANCHER_OPERATOR_MIN_VERSION=0.1.300",
"CATTLE_RANCHER_WEBHOOK_MIN_VERSION=0.1.0-beta900",
"TINI_URL_amd64=https://github.com/krallin/tini/releases/download/v0.18.0/tini",
"TINI_URL_arm64=https://github.com/krallin/tini/releases/download/v0.18.0/tini-arm64",
"TINI_URL=TINI_URL_amd64",
"HELM_URL_V2_amd64=https://github.com/rancher/helm/releases/download/v2.16.8-rancher1/rancher-helm",
"HELM_URL_V2_arm64=https://github.com/rancher/helm/releases/download/v2.16.8-rancher1/rancher-helm-arm64",
"HELM_URL_V2=HELM_URL_V2_amd64",
"HELM_URL_V3=https://get.helm.sh/helm-v3.3.1-linux-amd64.tar.gz",
"TILLER_URL_amd64=https://github.com/rancher/helm/releases/download/v2.16.8-rancher1/rancher-tiller",
"TILLER_URL_arm64=https://github.com/rancher/helm/releases/download/v2.16.8-rancher1/rancher-tiller-arm64",
"TILLER_URL=TILLER_URL_amd64",
"K3S_URL_amd64=https://github.com/rancher/k3s/releases/download/v1.18.8+k3s1/k3s",
"K3S_URL_arm64=https://github.com/rancher/k3s/releases/download/v1.18.8+k3s1/k3s-arm64",
"K3S_URL=K3S_URL_amd64",
"CHANNELSERVER_URL_amd64=https://github.com/rancher/channelserver/releases/download/v0.5.0/channelserver-amd64",
"CHANNELSERVER_URL_arm64=https://github.com/rancher/channelserver/releases/download/v0.5.0/channelserver-arm64",
"CHANNELSERVER_URL=CHANNELSERVER_URL_amd64",
"ETCD_URL_amd64=https://github.com/etcd-io/etcd/releases/download/v3.4.3/etcd-v3.4.3-linux-amd64.tar.gz",
"ETCD_URL_arm64=https://github.com/etcd-io/etcd/releases/download/v3.4.3/etcd-v3.4.3-linux-arm64.tar.gz",
"ETCD_URL=ETCD_URL_amd64",
"KUSTOMIZE_URL_amd64=https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v3.5.4/kustomize_v3.5.4_linux_amd64.tar.gz",
"KUSTOMIZE_URL_arm64=https://github.com/brendarearden/kustomize/releases/download/kustomize/v3.5.4/kustomize_v3.5.4_linux_arm64.tar.gz",
"KUSTOMIZE_URL=KUSTOMIZE_URL_amd64",
"CATTLE_UI_VERSION=2.5.6",
"CATTLE_DASHBOARD_UI_VERSION=v2.5.6",
"CATTLE_CLI_VERSION=v2.4.10",
"CATTLE_API_UI_VERSION=1.1.9",
"AUDIT_LOG_PATH=/var/log/auditlog/rancher-api-audit.log",
"AUDIT_LOG_MAXAGE=10",
"AUDIT_LOG_MAXBACKUP=10",
"AUDIT_LOG_MAXSIZE=100",
"AUDIT_LEVEL=0",
"CATTLE_CLI_URL_DARWIN=https://releases.rancher.com/cli2/v2.4.10/rancher-darwin-amd64-v2.4.10.tar.gz",
"CATTLE_CLI_URL_LINUX=https://releases.rancher.com/cli2/v2.4.10/rancher-linux-amd64-v2.4.10.tar.gz",
"CATTLE_CLI_URL_WINDOWS=https://releases.rancher.com/cli2/v2.4.10/rancher-windows-386-v2.4.10.zip",
"CATTLE_SERVER_VERSION=v2.5.7",
"CATTLE_AGENT_IMAGE=rancher/rancher-agent:v2.5.7",
"CATTLE_SERVER_IMAGE=rancher/rancher",
"ETCD_UNSUPPORTED_ARCH=amd64",
"ETCDCTL_API=3",
"SSL_CERT_DIR=/etc/rancher/ssl"
],
"Cmd": [
"/bin/sh",
"-c",
"#(nop) ",
"LABEL org.opencontainers.image.url=https://github.com/rancher/rancher"
],
"Image": "sha256:1b29162b758477ecb730a4cb7d9f5ffee7f6306ad75d58911fe3c21c8ab21aa8",
"Volumes": {
"/var/lib/cni": {},
"/var/lib/kubelet": {},
"/var/lib/rancher": {},
"/var/log": {}
},
"WorkingDir": "/var/lib/rancher",
"Entrypoint": [
"entrypoint.sh"
],
"OnBuild": null,
"Labels": {
"org.opencontainers.image.created": "2021-03-13T05:34:09Z",
"org.opencontainers.image.revision": "c824d91cd247c796c086b748371a5b670f2f3f72",
"org.opencontainers.image.source": "https://github.com/rancher/rancher.git",
"org.opencontainers.image.url": "https://github.com/rancher/rancher"
}
},
"DockerVersion": "19.03.8",
"Author": "",
"Config": {
"Hostname": "",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"CATTLE_SYSTEM_CHART_DEFAULT_BRANCH=release-v2.5",
"CATTLE_CHART_DEFAULT_BRANCH=release-v2.5",
"CATTLE_PARTNER_CHART_DEFAULT_BRANCH=main",
"CATTLE_HELM_VERSION=v2.16.8-rancher1",
"CATTLE_K3S_VERSION=v1.18.8+k3s1",
"CATTLE_MACHINE_VERSION=v0.15.0-rancher52",
"CATTLE_ETCD_VERSION=v3.4.3",
"CATTLE_CHANNELSERVER_VERSION=v0.5.0",
"LOGLEVEL_VERSION=v0.1.3",
"TINI_VERSION=v0.18.0",
"TELEMETRY_VERSION=v0.5.14",
"KUBECTL_VERSION=v1.19.7",
"DOCKER_MACHINE_LINODE_VERSION=v0.1.8",
"LINODE_UI_DRIVER_VERSION=v0.3.0",
"RANCHER_METADATA_BRANCH=release-v2.5",
"HELM_VERSION=v3.3.1",
"KUSTOMIZE_VERSION=v3.5.4",
"CATTLE_FLEET_MIN_VERSION=0.3.400",
"CATTLE_RANCHER_OPERATOR_MIN_VERSION=0.1.300",
"CATTLE_RANCHER_WEBHOOK_MIN_VERSION=0.1.0-beta900",
"TINI_URL_amd64=https://github.com/krallin/tini/releases/download/v0.18.0/tini",
"TINI_URL_arm64=https://github.com/krallin/tini/releases/download/v0.18.0/tini-arm64",
"TINI_URL=TINI_URL_amd64",
"HELM_URL_V2_amd64=https://github.com/rancher/helm/releases/download/v2.16.8-rancher1/rancher-helm",
"HELM_URL_V2_arm64=https://github.com/rancher/helm/releases/download/v2.16.8-rancher1/rancher-helm-arm64",
"HELM_URL_V2=HELM_URL_V2_amd64",
"HELM_URL_V3=https://get.helm.sh/helm-v3.3.1-linux-amd64.tar.gz",
"TILLER_URL_amd64=https://github.com/rancher/helm/releases/download/v2.16.8-rancher1/rancher-tiller",
"TILLER_URL_arm64=https://github.com/rancher/helm/releases/download/v2.16.8-rancher1/rancher-tiller-arm64",
"TILLER_URL=TILLER_URL_amd64",
"K3S_URL_amd64=https://github.com/rancher/k3s/releases/download/v1.18.8+k3s1/k3s",
"K3S_URL_arm64=https://github.com/rancher/k3s/releases/download/v1.18.8+k3s1/k3s-arm64",
"K3S_URL=K3S_URL_amd64",
"CHANNELSERVER_URL_amd64=https://github.com/rancher/channelserver/releases/download/v0.5.0/channelserver-amd64",
"CHANNELSERVER_URL_arm64=https://github.com/rancher/channelserver/releases/download/v0.5.0/channelserver-arm64",
"CHANNELSERVER_URL=CHANNELSERVER_URL_amd64",
"ETCD_URL_amd64=https://github.com/etcd-io/etcd/releases/download/v3.4.3/etcd-v3.4.3-linux-amd64.tar.gz",
"ETCD_URL_arm64=https://github.com/etcd-io/etcd/releases/download/v3.4.3/etcd-v3.4.3-linux-arm64.tar.gz",
"ETCD_URL=ETCD_URL_amd64",
"KUSTOMIZE_URL_amd64=https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v3.5.4/kustomize_v3.5.4_linux_amd64.tar.gz",
"KUSTOMIZE_URL_arm64=https://github.com/brendarearden/kustomize/releases/download/kustomize/v3.5.4/kustomize_v3.5.4_linux_arm64.tar.gz",
"KUSTOMIZE_URL=KUSTOMIZE_URL_amd64",
"CATTLE_UI_VERSION=2.5.6",
"CATTLE_DASHBOARD_UI_VERSION=v2.5.6",
"CATTLE_CLI_VERSION=v2.4.10",
"CATTLE_API_UI_VERSION=1.1.9",
"AUDIT_LOG_PATH=/var/log/auditlog/rancher-api-audit.log",
"AUDIT_LOG_MAXAGE=10",
"AUDIT_LOG_MAXBACKUP=10",
"AUDIT_LOG_MAXSIZE=100",
"AUDIT_LEVEL=0",
"CATTLE_CLI_URL_DARWIN=https://releases.rancher.com/cli2/v2.4.10/rancher-darwin-amd64-v2.4.10.tar.gz",
"CATTLE_CLI_URL_LINUX=https://releases.rancher.com/cli2/v2.4.10/rancher-linux-amd64-v2.4.10.tar.gz",
"CATTLE_CLI_URL_WINDOWS=https://releases.rancher.com/cli2/v2.4.10/rancher-windows-386-v2.4.10.zip",
"CATTLE_SERVER_VERSION=v2.5.7",
"CATTLE_AGENT_IMAGE=rancher/rancher-agent:v2.5.7",
"CATTLE_SERVER_IMAGE=rancher/rancher",
"ETCD_UNSUPPORTED_ARCH=amd64",
"ETCDCTL_API=3",
"SSL_CERT_DIR=/etc/rancher/ssl"
],
"Cmd": null,
"Image": "sha256:1b29162b758477ecb730a4cb7d9f5ffee7f6306ad75d58911fe3c21c8ab21aa8",
"Volumes": {
"/var/lib/cni": {},
"/var/lib/kubelet": {},
"/var/lib/rancher": {},
"/var/log": {}
},
"WorkingDir": "/var/lib/rancher",
"Entrypoint": [
"entrypoint.sh"
],
"OnBuild": null,
"Labels": {
"org.opencontainers.image.created": "2021-03-13T05:34:09Z",
"org.opencontainers.image.revision": "c824d91cd247c796c086b748371a5b670f2f3f72",
"org.opencontainers.image.source": "https://github.com/rancher/rancher.git",
"org.opencontainers.image.url": "https://github.com/rancher/rancher"
}
},
"Architecture": "amd64",
"Os": "linux",
"Size": 1009054986,
"VirtualSize": 1009054986,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/e0e9888286ece5f38106c7136a55c893ee3fdc50aba89283dd2663e3666cdeb7/diff:/var/lib/docker/overlay2/de8c0bd17a4c3e949e903127a6884c90378388cc38df365640cd68aef84b7f1a/diff:/var/lib/docker/overlay2/2413f7f6326707d6ba9c85afd8ffb133db986b050b26fa3c0f9dda6979490684/diff:/var/lib/docker/overlay2/24286ab7ef040914d508494a0b3ff28aeccaf061faa751720c6a650fb362cdf3/diff:/var/lib/docker/overlay2/4128667a6ea80606c6a020548f75e9ff3cdb53229266b5c9468ee9219543d6ee/diff:/var/lib/docker/overlay2/292c871ddbda37482e9b35856b84691cd1b11a8af8dd011d96569423f6404af0/diff:/var/lib/docker/overlay2/25fb5234c12e5a7c3ff235051cc6ce351f71fbe528bd777dcfe37c23267abcf0/diff:/var/lib/docker/overlay2/f5097ea28e78782824bda98c3aa1b1574d33492ec7f56f339a906d881908be02/diff:/var/lib/docker/overlay2/7e65b81b0035b71cd278d5c5f55833afaf6277725e78eab40f97254a8d0bd086/diff:/var/lib/docker/overlay2/0b6eaf9c44249aff34aada7949d1f3991d0f2a9d913aeb823f51eebda57bcd77/diff:/var/lib/docker/overlay2/6ec3f8a470f129ef06d8adf680dee36c77bf9210b926df2af1ec806d499a7f09/diff:/var/lib/docker/overlay2/3d0f2531059a1aa7cb9be6032184b9377e1568e8bd142724786342394e45fe32/diff:/var/lib/docker/overlay2/8525b42ef5d00ec939ffb08a07ab672ed018b6ca8e89d486a3312f035bc24724/diff:/var/lib/docker/overlay2/b41363996e5056b20367fce49a5ff09fc3e1e2725e97b826e3d3c2ae3bf3100f/diff:/var/lib/docker/overlay2/b1f49a36f6aeb5d4b7bbb4ad0121d2531e9501eae8038182882ca09d7b942d76/diff:/var/lib/docker/overlay2/afde3b973187fa24c88ee882638dc2c9ba70793a592470ca6124031e152ee896/diff:/var/lib/docker/overlay2/11e0b626f42b4b09e0aea8c13db87c081aae9771f417d676a6331b9181ead836/diff:/var/lib/docker/overlay2/1f839a22d8753639941f86f4e394db3c97079a4ed295b0e11c4c1d12bb284d29/diff:/var/lib/docker/overlay2/9104078e45d892ad75ddcf44c992fe6808a82719ff4209b2f8807e8a3344f69f/diff",
"MergedDir": "/var/lib/docker/overlay2/2edf47b664af3f46a13d92d48a3867efee66aa34420b77d4bc52afb0b6f174ab/merged",
"UpperDir": "/var/lib/docker/overlay2/2edf47b664af3f46a13d92d48a3867efee66aa34420b77d4bc52afb0b6f174ab/diff",
"WorkDir": "/var/lib/docker/overlay2/2edf47b664af3f46a13d92d48a3867efee66aa34420b77d4bc52afb0b6f174ab/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:837d6facb613e572926fbfe8cd7171ddf5919c1454cf4d5b4e78f3d2a7729000",
"sha256:0dd1581dbc3c692af6ab4f03d71cdc09a51e97ea48305dc0151e8c2462b6431d",
"sha256:07adad8f2caef690cc9bc8fee1a7be13ad39fe9b9f53235d4dfbd17b61b8d7b9",
"sha256:6134744da5096164d60380f1d5e6a09658b9da7fc91d9e99f561dfd71ca39f53",
"sha256:692ca7cda31769c777ac0e331ec9c140a3c48925804a02adc081b5c9cf453147",
"sha256:49b3fb23ffd084320487acc078347f28af4d5f2be2171c32f7264e09355ec579",
"sha256:f43f4ad6d6d6c7f631822589b6b89bff3468fd8e0287b7490052592bed32d950",
"sha256:12b5b239b8dcfabdef43e4cf04b7b5d976f65533eba9a4aa22b1918e9089fd46",
"sha256:004a98f887c8882263c0f2c5a9fbd83d8ed2e6784d18a738009ac81e105d42b7",
"sha256:16b4e3a7f161eb652c555d1b384bef556e786021c5417c7ea06ba70a538c35d4",
"sha256:875b916353d14f0601ab9bace03d977d683d8d7465fa772d9e6aab963f7ccfb3",
"sha256:6fee877a92bfe267483cce24ff47cf9322a61236b545c5c61a6d4250e1b688a0",
"sha256:9172cf8e8dfc50cddf60e9d06cf95a2cbb5a5aaea7aced91fab5619d3345f9c6",
"sha256:c9acfde923ec77d632a07d09794a5d96bda9ca525b56db980cc542d9b0cc8cb2",
"sha256:5f315516d4c5e5dd4441a4c92d9a6b9479e6370caefd2025ec0b5656f3e240e1",
"sha256:34501118e215acfe4577f487b6b7a2e42536038621d38990d51bac9bf51e78e8",
"sha256:96024a9c6f76ae088637b14f42054a15a8a5c256274c0891f4db1cde0c335c8b",
"sha256:0fd54d1fc7c705988abf7109e547d70ec692d313f08d71e264c0683ec1ec27e6",
"sha256:1dd8d7a2da11f3cbf42357949cda01ba688173f82f97260a71a66d3c357cea8f",
"sha256:00383549aebd325b23f7556fd57d18ddbc63b6fc6c11479451b3d7088810d7a5"
]
},
"Metadata": {
"LastTagTime": "0001-01-01T00:00:00Z"
}
}
]
Copy the code
Start the Rancher container
docker run -d --privileged --restart=unless-stopped -p 18080:80 -p 18443:443 \
-v /docker_volume/rancher_home/rancher:/var/lib/rancher \
-v /docker_volume/rancher_home/auditlog:/var/log/auditlog \
--name rancher rancher/rancher:latest
Copy the code
Open the Rancher
https://192.168.x.x:18443/
Copy the code
- Set the admin login password
- Import above to create K3s