linthan / minikube

an ansible way to set up a minikube environment in china

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

目的

快速搭建一个 minikube 的环境

实验环境

Ubuntu 18.04

步骤

  • 安装 ansible
pip install ansible
  • 安装角色依赖
ansible-galaxy install andrewrothstein.kubectl
  • 创建 inventory 修改成自己需要的目标机器
mv hosts.example hosts
ansible-playbook -i hosts playbook.yml

启动 minikube

第一种方式

minikube delete && minikube start --cpus=2 --memory=4096 --disk-size=10g \
	--registry-mirror=https://registry.docker-cn.com  --vm-driver=none

第二种方式

minikube start --image-mirror-country cn \
    --iso-url=https://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/iso/minikube-v1.6.0.iso \
    --registry-mirror=https://xxxx.mirror.aliyuncs.com \
    --vm-driver=virtualbox

可以参考下面一个博客

About

an ansible way to set up a minikube environment in china


Languages

Language:Python 66.0%Language:Shell 34.0%