Code Monkey home page Code Monkey logo

ansible's Introduction

KubeOperator Ansible 脚本

KubeOperator 是一个开源的轻量级 Kubernetes 发行版,专注于帮助企业规划、部署和运营生产级别的 K8s 集群。

该项目为 KubeOperator 安装包相关内容,包含了 KubeOperator 的安装脚本及默认配置文件等。

安装 netaddr 模块

pip install --no-cache-dir netaddr==0.7.19 -i https://mirrors.aliyun.com/pypi/simple/

执行安装

ansible-playbook -i hosts.hostname.ini -e @variables.yml 90-init-cluster.yml

问题反馈

如果您在使用过程中遇到什么问题,或有进一步的需求需要反馈,请提交 GitHub Issue 到 KubeOperator 项目的主仓库

ansible's People

Contributors

aaron3s avatar blue-troy avatar lvxiaohu avatar ssongliu avatar vpc123 avatar wanghe-fit2cloud avatar zhengkunwang223 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ansible's Issues

cri为containerd时,额外安装cni不可用

cni bin_dir 默认目录为 /opt/cni/bin,额外安装的cni会安装到这个目录下.但是目前containerd
config配置

代码

    [plugins.cri.cni]
      bin_dir = "{{ bin_dir }}"
      conf_dir = "/etc/cni/net.d"
      conf_template = ""

cni bin_dir为{{ bin_dir
}},它的值为/usr/local/bin,不符合cni标准.kubeoperator在安装cni如flannel时将flannel
bin同时放在了 /usr/local/bin 以及
/opt/cni/bin,因此cni配置为/usr/local/bin没有问题,但是一旦安装其他第三方cni则将出现问题

重启后kubelet无法启动

由于swap未关闭导致的kubelet 无法启动问题。

在安装k8s时,playbook使用 swapoff -a 保证了swap处于关闭状态。后续机器重启,swap未处于关闭状态,因此kubelet无法启动。

我看到项目playbook使用了去除/etc/fstab的办法。但是并不是所有swap都是用fstab进行维护。

  1. 根据 archlinux 中提到的,可以利用GPT自动挂载实现不是使用fstab实现自动swap挂载,这个办法是自动扫描分区的类型,删除fstab无法处理这种的问题。
  2. systemd-fstab-generator读取fstab生成包括swap的units,但这不意味着所有的swap unit都是由systemd-fstab-generator生成,我们可以自定义swap unit 实现swap挂载。

以上问题是具体环境中使用遇到的问题。

node-problem-detector权限不足

由于使用默认serviceaccount,导致无法patch对应resource。以下为node-problem-detector日志

E0815 13:11:48.168571       1 manager.go:162] failed to update node conditions: nodes "xxx" is forbidden: User "system:serviceaccount:kube-system:default" cannot patch resource "nodes/status" in API group "" at the cluster scope

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.