kubespray modify the configuration

1. modify the configuration before mounting

#
[root@slave1 kubespray]# vim inventory/local/group_vars/k8s-cluster.yml
kube_network_plugin: flannel
kube_version: v1.9.2
#
[root@slave1 kubespray]# vim inventory/local/group_vars/all.yml 
#根据系统修改
bootstrap_os: centos

[root@slave1 kubespray]# vim roles/network_plugin/flannel/defaults/main.yml
flannel_backend_type: "host-gw"
#修改管理密码
[root@slave1 kubespray]# vim roles/kubespray-defaults/defaults/main.yaml
bootstrap_os: centos
kube_version: v1.9.2
#密码
kube_api_pwd: 'yourpassowrd'

#修改kube api地址
[root@slave1 kubespray]# vim roles/kubernetes/master/defaults/main.yml
# change to 0.0.0.0 to enable insecure access from anywhere (not recommended)
kube_apiserver_insecure_bind_address: 0.0.0.0

# By default the external API listens on all interfaces, this can be changed to
# listen on a specific address/interface.
kube_apiserver_bind_address: 0.0.0.0
https://www.cnblogs.com/cheyunhua/p/9915605.html

 

Guess you like

Origin www.cnblogs.com/hixiaowei/p/11563979.html