first commit
This commit is contained in:
commit
ba848e218d
1001 changed files with 152333 additions and 0 deletions
74
CloudNative/Kubernetes/Base/MiniKube安装配置.md
Normal file
74
CloudNative/Kubernetes/Base/MiniKube安装配置.md
Normal file
|
@ -0,0 +1,74 @@
|
|||
# 安装docker-ce
|
||||
## 安装必要的系统工具软件
|
||||
`yum install -y yum-utils device-mapper-persistent-data lvm2`
|
||||
## 添加软件源
|
||||
```
|
||||
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
|
||||
```
|
||||
## 更新源并安装docker
|
||||
```
|
||||
yum makecache fast
|
||||
yum -y install docker-ce
|
||||
```
|
||||
## 配置docker加速
|
||||
### 修改/etc/docker/daemon.json文件,添加阿里云镜像加速
|
||||
***需要创建/etc/docker目录与daemon.json文件***
|
||||
```
|
||||
{
|
||||
"registry-mirrors": ["https://yn64512p.mirror.aliyuncs.com"]
|
||||
}
|
||||
```
|
||||
### 启动docker
|
||||
```
|
||||
systemctl daemon-reload
|
||||
systemctl restart docker
|
||||
```
|
||||
# 安装MiNiKube
|
||||
## 添加用户
|
||||
```
|
||||
useradd -u 530 -g docker k8s
|
||||
```
|
||||
## 下载kubectl,并移动到/home/k8s/.bin目录中(k8s用户可直接执行),并添加到PATH中
|
||||
```
|
||||
su - k8s
|
||||
|
||||
mkdir .bin
|
||||
|
||||
cd .bin && curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
|
||||
|
||||
chmod +x kubectl
|
||||
|
||||
cat ~/.bash_profile
|
||||
...
|
||||
PATH=$PATH:~/.bin
|
||||
export PATH
|
||||
...
|
||||
|
||||
source ~/.bash_profile
|
||||
|
||||
```
|
||||
|
||||
## 下载安装MiniKube
|
||||
```
|
||||
cd /home/k8s/.bin
|
||||
|
||||
wget https://github.com/kubernetes/minikube/releases/download/v1.15.0/minikube-linux-x86_64
|
||||
```
|
||||
## 启动MiniKube
|
||||
```
|
||||
minikube start --network-plugin=cni --cni=calico
|
||||
```
|
||||
|
||||
# 暂停集群
|
||||
```
|
||||
minikubu pause
|
||||
```
|
||||
# 停止集群
|
||||
```
|
||||
minikube stop
|
||||
```
|
||||
# 卸载集群
|
||||
```
|
||||
minikube delete --all
|
||||
```
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue