From 8a0c780342861e9056c32c4ff19beb5e1dfdc459 Mon Sep 17 00:00:00 2001 From: Infraplus Date: Sun, 7 Feb 2021 03:00:40 +0100 Subject: [PATCH 1/3] Update README.md Add TOC --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 43f48ae..3a9c89a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,20 @@ +- [CKA Practice Environment](#cka-practice-environment) + * [the MOSTLY DIFFERENCE from the original repo](#the-mostly-difference-from-the-original-repo) + * [Quick Start do not need to clone the repo](#quick-start-needn-t-clone-the-repo) + + [Step 1 Frontend webpage](#step-1-frontend-webpage) + + [Step 2 Backend k8s](#step-2-backend-k8s) + * [Getting the environment up and ready](#getting-the-environment-up-and-ready) + + [1. install `docker-compose`](#1-install-docker-compose) + + [2. up it](#2-up-it) + - [To use the prebuilt images](#to-use-the-prebuilt-images) + - [To build the images yourself locally](#to-build-the-images-yourself-locally) + + [3. provision k8s (k3s)](#3-provision-k8s--k3s-) + - [**if you already have Kubernetes Cluster**](#if-you-already-have-kubernetes-cluster) + - [Rancher k3s](#rancher-k3s) + * [Uninstall](#uninstall) + +Table of contents generated with markdown-toc + # CKA Practice Environment ## the MOSTLY DIFFERENCE from the original repo From fdd08fc0dfde4acbe9f4f8cbf56fe61d8fb964d7 Mon Sep 17 00:00:00 2001 From: Infraplus Date: Sun, 7 Feb 2021 03:02:42 +0100 Subject: [PATCH 2/3] Update README.md Fix TOC --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3a9c89a..a1e8d7e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ - [CKA Practice Environment](#cka-practice-environment) * [the MOSTLY DIFFERENCE from the original repo](#the-mostly-difference-from-the-original-repo) - * [Quick Start do not need to clone the repo](#quick-start-needn-t-clone-the-repo) + * [Quick Start do not need to clone the repo](#quick-start-neednt-clone-the-repo) + [Step 1 Frontend webpage](#step-1-frontend-webpage) + [Step 2 Backend k8s](#step-2-backend-k8s) * [Getting the environment up and ready](#getting-the-environment-up-and-ready) @@ -8,7 +8,7 @@ + [2. up it](#2-up-it) - [To use the prebuilt images](#to-use-the-prebuilt-images) - [To build the images yourself locally](#to-build-the-images-yourself-locally) - + [3. provision k8s (k3s)](#3-provision-k8s--k3s-) + + [3. provision k8s (k3s)](#3-provision-k8s-k3s) - [**if you already have Kubernetes Cluster**](#if-you-already-have-kubernetes-cluster) - [Rancher k3s](#rancher-k3s) * [Uninstall](#uninstall) From 2486b74347948580385d4fa58da6c5bd8578479e Mon Sep 17 00:00:00 2001 From: Infraplus Date: Sun, 7 Feb 2021 16:33:28 +0100 Subject: [PATCH 3/3] Update README.md * Update Docker compose Installation * Fix Kubernetes conf file (127.0.0.1 instead of localhost) --- README.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a1e8d7e..2c7ded8 100644 --- a/README.md +++ b/README.md @@ -34,10 +34,8 @@ export PUBLIC_IP=47.52.219.131 export PRIVATE_IP=172.31.63.194 # install docker-compose -wget https://docs.rancher.cn/download/compose/v1.24.1-docker-compose-Linux-x86_64 -mv v1.24.1-docker-compose-Linux-x86_64 docker-compose -chmod +x docker-compose -mv docker-compose /usr/local/bin/ +sudo curl -L "https://github.com/docker/compose/releases/download/1.28.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose +sudo chmod 755 /usr/local/bin/docker-compose docker-compose -v # gen docker-compose.yaml and up it @@ -96,8 +94,8 @@ kubectl get node # copy kubeconfig to /root/.kube/config cp /etc/rancher/k3s/k3s.yaml /root/.kube/config -sed -i "s/localhost/$(echo $PRIVATE_IP)/g" /root/.kube/config - +sed -i "s/127.0.0.1/$(echo $PRIVATE_IP)/g" /root/.kube/config + kubectl --kubeconfig /root/.kube/config get node ```