-
Notifications
You must be signed in to change notification settings - Fork 1
/
k8s_example.yml
42 lines (37 loc) · 1.01 KB
/
k8s_example.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
- name: k8s master set hostname
hosts: k8s_master
become: yes
roles:
- role: hostname # Warning: change hostname
hostname_prefix: "master-"
- name: k8s worker set hostname
hosts: k8s_worker
become: yes
roles:
- role: hostname # Warning: change hostname
hostname_prefix: "worker-"
# - nfsclient
# - role: ceph
# ceph_repo: "https://mirrors.tuna.tsinghua.edu.cn/ceph"
- name: k8s init
hosts: k8s
become: yes
roles:
- role: common # Warning: disable filewalld,selinux,swap
timezone: "Asia/Shanghai"
# - role: sshd
# sshd_UseDNS: "no"
# sshd_PasswordAuthentication: "no"
- ntpd
- role: docker
docker_repo: "https://mirrors.tuna.tsinghua.edu.cn/docker-ce"
docker_registry_mirror: "https://daocloud.io"
docker_dns:
- 223.5.5.5
- 223.6.6.6
- 114.114.114.114
docker_log_max_size: 100m
docker_log_max_file: 10
- role: kubernetes
k8s_repo: "https://mirrors.aliyun.com/kubernetes"