使用Ansible 安装 k8s clusterAnsible 脚本资源git clone https://gitee.com/yaccbison/ansible-inst-k8s-binary.git通过网盘分享的文件:k8s 1.23.4 资源链接: https://pan.baidu.com/s/1pnEmuNmo19KuafNQ-HpyMQ?pwd=ikbj 提取码: ikbj, 视频播放量 7、弹幕量 0、点赞数 0
- name: tasks for node01和node02 block: - name: get the join command from master01 command: kubeadm token create --print-join-command register: join_command_output delegate_to: master01 - name: join the kubernetes cluster command: "{{ join_command_output.stdout }}" ...
You should now deploy a pod network to the cluster. Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at: https://kubernetes.io/docs/concepts/cluster-administration/addons/ Then you can join any number of worker nodes by running the following on each as root: #必...
kube-ovn CLUSTER_NETWORK="calico" #kube-proxy的服务代理模式: 'iptables' or 'ipvs' PROXY_MODE="ipvs" # K8S服务CIDR,不与节点(主机)联网重叠 SERVICE_CIDR="10.68.0.0/16" # 集群CIDR(Pod CIDR),不与节点(主机)网络重叠 CLUSTER_CIDR="172.20.0.0/16" # 节点端口范围 NODE_POR...
192.168.56.13 node_name=k8s-master3 [k8s:children] master node 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 1.3 命令行使用 1、连接远程主机认证 SSH密码认证: [webservers] 192.168.56.11:22 ansible_ssh_user=root ansible_ssh_pass=centos ...
kubespray/inventory/group_vars/k8s-cluster.yml 为控制一些基础信息的配置文件。 修改为flannel kubespray/inventory/group_vars/all.yml 控制一些需要详细配置的信息 修改为centos - 替换flannel的vxlan为host-gw roles/network_plugin/flannel/defaults/main.yml ...
1.创建playbook文件(参考 install_docker_playbook.yml) [root@ansible ~]# vim install_docker_playbook.yml [root@ansible ~]# cat install_docker_playbook.yml - hosts: k8s-all remote_user: root vars: docker_version: 18.09.2 tasks: - name: install dependencies ...
k8s_cluster gather_facts: no vars: apps: - kube-apiserver:v1.17.4 - kube-controller-manager:v1.17.4 - kube-scheduler:v1.17.4 - kube-proxy:v1.17.4 - pause:3.1 - etcd:3.4.3-0 - coredns:1.6.5 vars_prompt: - name: cfg_python prompt: Do you need to install docker pkg for python...
'/tmp/k8s' # 临时目录 # 时间同步服务器 time_server: '192.168.56.118' # crontab文件 cron: /var/spool/cron/root # 安装docker docker: docker # 集群网络 service_cidr: '10.96.0.0/16' # service网段 cluster_first_ip: '10.96.0.1' # service网段第一个IP cluster_dns: '10.96.0.10' # dns IP...
./install.sh k8s master同步crt证书 mkdir/etc/docker/certs.d/harbor.exmple.demo-p scp/usr/local/src/harbor/certs/harbor-ca.crt192.168.7.101:/etc/docker/certs.d/harbor.exmple.demo vim/etc/hosts192.168.7.103harbor.exmple.demo systemctl restart docker ...