728x90
반응형
Prerequisites
install python-pip & python3-pip & ansible
python-pip
Access https://www.python.org, download python and install it.
Once the installation is done, Check below command.
12$ python3 --versionPython 3.7.4cs
python3-pip
ansible
1brew install ansiblecs
Settings
clone the kubespray repository
1$ git clone https://github.com/kubernetes-sigs/kubespray.gitcs execute follow the command.
sudo pip install -r requirements.txtcp -rfp inventory/sample inventory/myclusterdeclare -a IPS=(10.10.1.3 10.10.1.4 10.10.1.5) // cluster ipsCONFIG_FILE=inventory/mycluster/hosts.yml python3 contrib/inventory_builder/inventory.py ${IPS[@]}cat inventory/mycluster/group_vars/all/all.ymlcat inventory/mycluster/group_vars/k8s-cluster/k8s-cluster.ymlansible-playbook -i inventory/mycluster/hosts.yml --become --become-user=root cluster.ymlcs if you encounter an error with ruamel.yaml during the process, then you should install ruamel.yaml using pip.
sudo pip install ruamel.yamlcs
Check out
root@node1:~# kubectl versionClient Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.0", GitCommit:"e8462b5b5dc2584fdcd18e61cfe9f1e4d970a529", GitTreeState:"clean", BuildDate:"2019-07-19T16:32:14Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.0", GitCommit:"e8462b5b5dc2584fdcd18e63cfe9f1e4d970a529", GitTreeState:"clean", BuildDate:"2019-07-19T16:32:14Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}root@node1:~# kubectl get nodesNAME STATUS ROLES AGE VERSIONnode1 Ready master 11m v1.12.3node2 Ready master 12m v1.12.3node3 Ready <none> 11m v1.12.3node4 Ready <none> 11m v1.12.3cs
728x90
반응형
댓글