CloudGarage の無償インスタンスを利用して kubernetes クラスタを構築してみる(in japanese)
This repository use itamae.
$ bundle installAnd, edit ~/.ssh/config on your PC to enable to access each instance easily.
$ cp base/user_template.json base/my.json <edit my.json> $ bundle exec itamae ssh -h master01 -j base/my.json -u root base/user.rb $ bundle exec itamae ssh -h node01 -j base/my.json -u root base/user.rb $ bundle exec itamae ssh -h node02 -j base/my.json -u root base/user.rb$ bundle exec itamae ssh -h master01 -j base/my_hosts.json -u root base/hosts.rb $ bundle exec itamae ssh -h node01 -j base/my_hosts.json -u root base/hosts.rb $ bundle exec itamae ssh -h node02 -j base/my_hosts.json -u root base/hosts.rb$ bundle exec itamae ssh -h master01 -j master/config.json master/etcd.rb $ bundle exec itamae ssh -h master01 master/flanneld.rb <Create secret key for serviceaccount.key, and save at files/ .> $ bundle exec itamae ssh -h master01 -j master/config.json master/kubernetes.rb $ bundle exec itamae ssh -h master01 -j master/config.json master/kubectl_config.rbTo create secret key, do $ openssl genrsa -out /path/to/serviceaccount.key 2048 .
$ bundle exec itamae ssh -h node01 -j node/node_config.json node/flanneld.rb $ bundle exec itamae ssh -h node02 -j node/node_config.json node/flanneld.rb $ bundle exec itamae ssh -h node01 -j node/node_config.json node/kubernetes.rb $ bundle exec itamae ssh -h node02 -j node/node_config.json node/kubernetes.rb$ kubectl get nodes NAME STATUS AGE node01 Ready 3m node02 Ready 9sThat's all!