猪脚煲汤放什么材料好| 代谢慢是什么原因引起的| 打开心扉是什么意思| 胸腺瘤是什么病| 低血糖吃什么好的快| 妇科菌群失调吃什么药| 三只手是什么意思| ideal是什么意思| 印度为什么叫三哥| 膂力是什么意思| 脱疽是什么意思| 椰子水有什么功效| 滂沱是什么意思| 纳米是什么意思| 什么人不适合吃榴莲| 祛痣后应注意什么| 爱豆什么意思| 小麦什么时候收割| 手长水泡是什么原因| 阴虚吃什么好| 佛陀是什么意思| 什么的围巾| 蚂蚁代表什么风水| 什么是业障| 沙棘不能和什么一起吃| 包茎是什么| 6月底什么星座| 梦见涨大水是什么意思| 淋巴炎吃什么药| 喉咙痛可以吃什么| nec医学上是什么意思| 马加其念什么| 阴吹是什么| 妨父母痣是什么意思| 磨牙是什么原因引起的如何治疗| 女生掉头发严重是什么原因| 沉香有什么作用与功效| 脖子短适合什么发型| 单核细胞偏高是什么意思| 董监高是什么意思| 为什么说婴儿摔床没事| 脉紧是什么意思| 身心合一是什么意思| 什么书买不到| 锅包肉用什么淀粉| 男人吃韭菜有什么好处| 为什么总想睡觉| m指的是什么| 坐骨神经痛是什么症状| 蟑螂中药名称叫什么| 中国反导弹系统叫什么| 钾血症是什么病| 什么是海啸| 身上痣多是什么原因| 12月27号是什么星座| 上火吃什么最快能降火| polo villae是什么档次| 胃溃疡是什么原因导致的| q热是什么病| 为什么湿气重| 实名认证是什么意思| 吉兆什么意思| 上皮内瘤变是什么意思| 衣服为什么会发霉| 男人吃什么食物可以补肾壮阳| 嗓子发炎肿痛吃什么药| cpk是什么意思啊| 心率偏高是什么原因| 漏尿是什么原因| burgundy是什么颜色| 看正月初一是什么生肖| 宿醉是什么意思| 左上腹是什么器官| 防代表什么生肖| 贫血缺什么| 红蓝是什么意思| 灰度是什么意思| 一片冰心在玉壶的冰心是什么意思| 晚八点是什么时辰| 牛叉是什么意思| 91年属什么生肖| 发福是什么意思| 麝香是什么味道| 捡到狗狗代表什么预兆| mcv偏低是什么意思| 辐射是什么| 窈窕淑女君子好逑是什么意思| 高项是什么| 为什么总是拉肚子| 9.29是什么星座| 梦见别人怀孕了是什么意思| 胡字五行属什么| 什么是沉没成本| 南枝是什么意思| 吐痰带血丝是什么原因| 百白破是预防什么的| atp是什么意思| ca医学代表什么意思| 杞菊地黄丸治什么病| 保温壶什么内胆最健康| 屁臭是什么原因造成的| 梦见别人拉屎是什么意思| 虾与什么食物相克| 麦高芬是什么意思| 95年属什么生肖婚配表| 自贸区是什么意思| 音字五行属什么| 心率过速是什么原因| 弱精吃什么能提高活力| 舌苔发白是什么问题| 肌酐高是什么意思| 玉米不能和什么食物一起吃| 电灯是什么时候发明的| 女右眉毛跳是什么预兆| 身败名裂是什么意思| 眼睛看东西模糊是什么原因| 副乡长是什么级别| 虚岁28岁属什么生肖| 不让看朋友圈显示什么| 平衡液又叫什么名字| 木姜子什么味道| 脖子长小肉粒是什么原因| 韩后属于什么档次| 三天没有大便是什么原因| 产后大出血一般发生在什么时候| 送男生什么生日礼物好| 叶公好龙是什么故事| 文艺范是什么意思| 慢阻肺吃什么药最有效| 规整是什么意思| 难受是什么意思| 什么叫阵雨| 弯弯的月亮像什么| 字读什么| 小孩黄疸高有什么危害| 什么东西蛋白质最高| 舌苔厚腻是什么原因| 皮肤癣用什么药| 清朝什么时候灭亡的| 肾虚吃什么药最有效| 晚上睡觉容易醒是什么原因| 木鱼是什么意思| 梦见自己鞋子破了是什么意思| 资金盘是什么意思| 五红汤什么时候喝最好| 高锰酸钾是什么东西| 常吃南瓜有什么好处和坏处| 宝宝照蓝光有什么副作用| 什么牌子的电动车好| 什么的尘土| 羽毛球拍什么材质的好| 什么是竖式计算| o型血可以接受什么血型| 梦见钱是什么预兆| 骨赘是什么意思| 花仙子是什么意思| 黄皮肤适合什么颜色的衣服| 什么空如洗| 从未是什么意思| 胎儿缺氧孕妇会有什么反应| 新疆是什么气候| 尿糖弱阳性是什么意思| 痰多吃什么化痰| 脸上老是长闭口粉刺是什么原因| s925是什么| 腿麻是什么原因| 油面筋是什么做的| 绮丽的什么| 糖尿病为什么治不好| 大红袍属于什么茶| 生肖龙和什么生肖最配| 裸花紫珠是主治什么病| 品牌是什么意思| 梦见自己的车丢了是什么意思| 李知恩为什么叫iu| 白薯是什么| 无头鱼是什么鱼| 猎户座是什么星座| 广角是什么| 金刚芭比什么意思| 生源地是什么意思| 四两棉花歇后语是什么| 巨无霸是什么意思| 骨折用什么药恢复快| 承恩是什么意思| 大便绿色什么原因| 金生水是什么意思| 再生聚酯纤维是什么面料| 血小板偏高是什么意思| 春风什么什么| 状元红又叫什么荔枝| 天葬是什么| 肚子上面疼是什么原因| 带状疱疹不能吃什么| 喝酒吃什么解酒| 正正得什么| 为什么受伤总是我| 胆囊结石有什么影响| dxm是什么药| 肺气肿挂什么科| 心开窍于什么| 看日历是什么生肖| 血红蛋白偏低是什么原因| 7月6日什么星座| 低密度脂蛋白胆固醇偏高是什么意思| 血清蛋白是什么| 什么叫割礼| 顽固是什么意思| 蘑菇和什么不能一起吃| npv是什么病毒| 秋分节气的含义是什么| 洗涤是什么意思| 小生化是检查什么项目| 口角炎缺乏什么维生素| 龟粮什么牌子的好| 副肾是什么药名| 吃什么东西对肺好| 时刻是什么意思| 长期熬夜吃什么可以补回来| 去年属什么生肖| 水煮鱼用什么鱼| 男人性功能不好吃什么药| 吃什么补肾气| 身体发麻是什么原因| 甲肝抗体阳性代表什么| 小孩坐火车需要什么证件| 洛神是什么意思| 九二年属猴的是什么命| 鸦雀无声是什么意思| 威海是什么海| 来月经喝什么好| 和胃降逆是什么意思| 秋葵长什么样| 糖类抗原ca199偏高是什么原因| 吃什么可以止咳化痰| 血糖高喝什么好| 右肺上叶肺大泡是什么意思| 男人做梦梦到蛇是什么意思| 孕妇可以吃什么鱼| 什么是性质| 什么可以祛斑| gmp是什么| 超凡脱俗是什么意思| 小腿骨头疼是什么原因| 健康证要带什么| 除了肠镜还有什么方法检查肠道| 什么东西人们都不喜欢吃| 同房后需要注意什么| 维生素c不能和什么一起吃| 竖起中指是什么意思| 脚脱皮用什么药| 梦见什么是受孕成功了| 河马吃什么| 中元节又叫什么节| 莞式服务是什么| 王晶为什么不娶邱淑贞| 天蝎座属于什么象星座| 医院门特是什么意思| 清一色是什么意思| 为什么不建议割鼻息肉| 孕妇吃蓝莓对胎儿有什么好处| 金字旁和什么有关| 更年期什么时候结束| 艾滋病人有什么特征| 百度
Skip to content

claudio4/k3s-ansible-flatcar

?
?

Repository files navigation

Automated build of HA k3s Cluster with kube-vip for Flatcar

This playbook will build an HA Kubernetes cluster on Flatcar hosts with k3s, kube-vip via ansible.

This project tries to be unoppiniated so it just install the bare-minimum required for having an HA cluster that can handle your kubectl commands. This means that an installation produced from this project will lack important things like a CNI, an IngressController and a LoadBalancer, and yes the ones included with k3s are disabled.

This is based on the work from this fork which is based on this other fork ] which is based k3s-io/k3s-ansible. It uses kube-vip to create a load balancer for control plane.

?? k3s Ansible Playbook

Build a Kubernetes cluster using Ansible with k3s. The goal is easily install a HA Kubernetes cluster on machines running:

  • Flatcar
  • Fedora CoreOS (not tested)

on processor architecture:

  • x64
  • arm64

? System requirements

  • Deployment environment must have Ansible 2.4.0+. If you need a quick primer on Ansible you can check out TechnoTim's docs and setting up Ansible.
  • server and agent nodes should have passwordless SSH access, if not you can supply arguments to provide credentials ?g-ask-pass --ask-become-pass to ach command.

?? Getting Started

?? Preparation

First create a new directory based on the sample directory within the inventory directory:

cp -R inventory/sample inventory/my-cluster

Second, edit inventory/my-cluster/hosts.ini to match the system information gathered above.

For example:

[master]
192.168.30.38
192.168.30.39
192.168.30.40

[node]
192.168.30.41
192.168.30.42

[k3s_cluster:children]
master
node

If multiple hosts are in the master group, the playbook will automatically set up k3s in HA mode with etcd.

This requires at least k3s version 1.19.1 however the version is configurable by using the k3s_version variable.

If needed, you can also edit inventory/my-cluster/group_vars/all.yml to match your environment.

?? Bootstrap Python

For most of it operations Ansible requires Python installed in the remote host, this is an issue as Flatcar does not include Python. Fortunately we can still use the parts of ansible that do not require Python to install pypy (a minimal python distribution) in the Flatcar nodes.

ansible-playbook bootstrap-python.yml -i inventory/my-cluster/hosts.ini

?? Create Cluster

Start provisioning of the cluster using the following command:

ansible-playbook site.yml -i inventory/my-cluster/hosts.ini

After deployment control plane will be accessible via virtual ip-address which is defined in inventory/group_vars/all.yml as apiserver_endpoint

?? Rerunning the site.yml playbook

Rerunning this playbook will have no effect in the cluster if no variables or template files are modified.

? Operations that this playbook can perform in reruns after installation

  • Joining new nodes/masters. Simply add them to the hosts.ini and rerun (?? This operations causes the restart of the k3s daemon and it may produce downtime).
  • Modifying the systemd service (including the process arguments) and k3s manifests. Edit them/the variable they use and rerun.

? Operations that this playbook can NOT perform in reruns after installation

  • Upgrading k3s. This is best done via the Rancher’s system-upgrade-controller.
  • Removing nodes. This is best done manually or with an specialized tool. Removing a node from the inventory will just case that future runs of the playbook wodn't know of the node existance.

?? Remove k3s cluster

Be aware that the ability of removing the cluster has low priority in this project and it's highly advised to reinstall the flatcar hosts instead.

ansible-playbook reset.yml -i inventory/my-cluster/hosts.ini

You should also reboot these nodes due to the VIP not being destroyed

?? Kube Config

To copy your kube config locally so that you can access your Kubernetes cluster run:

scp debian@master_ip:~/.kube/config ~/.kube/config

?? Testing your cluster

See the commands here.

?? Vagrant

You may want to kickstart your k3s cluster by using Vagrant to quickly build you all needed VMs with one command. Head to the vagrant subfolder and type vagrant up to get your environment setup. After the VMs have got build, deploy k3s using the Ansible playbook site.yml by the vagrant provision --provision-with ansible command.

Thanks ??

This repo is really standing on the shoulders of giants. To all those who have contributed.

Thanks to these repos for code and ideas:

神经性耳鸣有什么症状 玲珑是什么意思 71年属猪是什么命 朱砂属于五行属什么 气泡水是什么
小丑叫什么 附件炎是什么症状 金匮肾气丸适合什么人吃 过梁是什么 itp是什么病
牙齿脱矿是什么原因 硅油是什么 脚爆皮是什么原因 龙头凤尾是什么生肖 清明有什么习俗
求欢是什么意思 糯米粉可以做什么 三级士官是什么级别 节节草煮水喝治什么病 客厅挂钟放在什么位置好
认知是什么意思hcv7jop9ns3r.cn 月经提前10天正常吗是什么原因hcv8jop8ns6r.cn 眼花是什么原因hcv8jop5ns3r.cn 梦见和老公结婚是什么意思hcv9jop0ns9r.cn 小麻雀吃什么zhiyanzhang.com
月经病是什么意思啊hcv8jop2ns6r.cn 血糖高了会有什么危害beikeqingting.com 讹人是什么意思hcv9jop8ns3r.cn ahc属于什么档次youbangsi.com 脾肾阳虚吃什么药最好hcv8jop3ns4r.cn
血小板计数偏高是什么意思hcv7jop9ns8r.cn 青鱼和草鱼有什么区别hcv8jop6ns4r.cn 阴道是什么hcv7jop5ns0r.cn 五险一金和社保有什么区别hcv8jop2ns9r.cn dha每天什么时候吃最好hcv9jop3ns4r.cn
樊字五行属什么sanhestory.com bella什么意思hcv9jop3ns3r.cn 利巴韦林是什么药hcv9jop1ns8r.cn 上海市委书记什么级别hcv9jop5ns7r.cn 冬天用什么沐浴露好hcv8jop1ns7r.cn
百度