k8sli / kubeplay

Deploy kubernetes by kubespray in offline
https://t.me/kubeplay
Apache License 2.0
142 stars 39 forks source link

feature(*): run as no root user and support kubesphere offline deploy #28

Open shiqinfeng1 opened 3 years ago

shiqinfeng1 commented 3 years ago

在一些特殊的客户中,不允许以root身份执行的,所以可能需要普通用户来运行

  1. 我目前本地测试环境kubespary中使用了非root登录安装,(虽然我不确定是不是真的全部命令是非root执行的):

    [all]
    node1 ansible_host=192.168.1.19 ip=192.168.1.19 etcd_member_name=etcd1 ansible_ssh_user=sqf ansible_sudo_pass=sqf
    node2 ansible_host=192.168.1.20 ip=192.168.1.20 etcd_member_name=etcd2 ansible_ssh_user=sqf ansible_sudo_pass=sqf
    node3 ansible_host=192.168.1.21 ip=192.168.1.21 etcd_member_name=etcd3 ansible_ssh_user=sqf ansible_sudo_pass=sqf

    是不是kubeplay需要做一定的改造?

  2. 我在kubespary中增加了kubesphere的部署剧本,并且可以在cluster-configuration.yaml中配置local_registry为本地仓库,那么是不是也能够整合到kubeplay中呢?

muzi502 commented 3 years ago
  1. 支持非 root 用户但需要 sudo ,只需要配置好 inventory 即可,在执行的时候默认会加上 --become root
  2. 可以整合在 kubeplay 中,后面会将 kubesphere 集成到 kubeplay 中来
shiqinfeng1 commented 3 years ago

功德无量。期待中。。。 虽然我也搭建了离线环境, 但不够彻底和自动化,向大佬学习!

freezxcs commented 2 years ago

非root的用户部署,只需要配置好 inventory ,有具体的配置方式吗