KUBERNETES
Linux下 相关软件安装
1. minikube安装
**********************!!!PROTECTION POLICY!!!**********************
Waiting For The Next Deployment, Maybe It Will Be Displayed After That.
2. docker安装
**********************!!!PROTECTION POLICY!!!**********************
Waiting For The Next Deployment, Maybe It Will Be Displayed After That.
3. podman安装
sudo apt update
sudo apt -y install software-properties-common
sudo add-apt-repository -y ppa:projectatomic/ppa
sudo apt -y install podman
cat > /etc/containers/registries.conf << EOF
unqualified-search-registries = ["docker.io"]
[[registry]]
prefix = "docker.io"
location = "uyah70su.mirror.aliyuncs.com"
EOF
# Debian Unstable/Sid
echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_Unstable/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_Unstable/Release.key | sudo apt-key add -
# Debian Testing
echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_Testing/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_Testing/Release.key | sudo apt-key add -
# Debian 10
echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/Release.key | sudo apt-key add -
sudo apt-get update -qq
sudo apt-get -qq -y install podman
minikube 基本使用
1. minikube 启动集群
minikube start --image-mirror-country cn --iso-url=https://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/iso/minikube-v1.11.0.iso --registry-mirror https://uyah70su.mirror.aliyuncs.com
# registry-mirror 影响docker镜像拉取速度 最好使用镜像站
2. 查询集群状态
minikube status
minikube dashboard
minikube addons list
3. 连接到内部集群
**********************!!!PROTECTION POLICY!!!**********************
Waiting For The Next Deployment, Maybe It Will Be Displayed After That.
4. 停止集群
minikube stop
5. 删除集群
minikube delete
rm -rf ~/.minikube ~/.kube
6. 获取容器环境
**********************!!!PROTECTION POLICY!!!**********************
Waiting For The Next Deployment, Maybe It Will Be Displayed After That.
* virtualbox 虚拟机跨操作系统 共享
相关目录路径
系统类型 | minikube涉及配置 | kubectl涉及配置 | vbox涉及配置 |
---|---|---|---|
Linux | ~/.minikube | ~/.kube | ~/.config/VirtualBox |
Windows | ~/.minikube | ~/.kube | ~/.VirtualBox |