vagrant+ansible安装k8s集群

已过时,不可用 部署环境: ubuntu20.04, 8G+4核 kubernete版本: 1.22.1 1. 安装vagrant和ansible 按官网教程即可 2. Vagrantfile 建立如下目录 k8s-cluster ├── kubernetes-setup │ ├── master-playbook.yml │ └── node-playbook.yml └── Vagrantfile 其中,Vagrantfile内容如下: IMAGE_NAME = "bento/ubuntu-16.04" N = 2 Vagrant.configure("2") do |config| config.ssh.insert_key = false config.vm.provider "virtualbox" do |v| v.memory = 2048 v.cpus = 2 end config.vm.define "k8s-master" do |master| master.vm.box = IMAGE_NAME master.vm.network "private_network", ip: "192.168.50.10" master.vm.hostname = "k8s-master" master.vm.provision "ansible" do |ansible| ansible.playbook = "kubernetes-setup/master-playbook.yml" ansible....

September 6, 2021 · 4 min · 李昌