3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CentOS7でのKubernetes クラスタ構築(worker編)

Last updated at Posted at 2018-09-27

こちらを参考にした、kubernetes worker nodeの設定です。

実行環境は次の通りです。

  • CentOS 7.4
  • kubernetes v1.5.2
  • flanneld 0.7.1
  • etcd 3.2.22
  • Docker 1.13.1

kubernetesのインストール

# vi /etc/hosts
10.44.59.76 worker1

yum -y install kubernetes docker flannel

##マスターの設定

# vi /etc/kubernetes/config
KUBE_MASTER="--master=http://10.44.59.239:8080"

##Kubeletの設定

  • KUBELET_ADDRESS: worker nodeのIPアドレス
  • KUBELET_HOSTNAME : worker nodeのホスト名
  • KUBELET_API_SERVER : APIサーバーのIPアドレス(masterと同居)
# vi /etc/kubernetes/kubelet
# The address for the info server to serve on (set to 0.0.0.0 or "" for all interfaces)
KUBELET_ADDRESS="--address=10.44.59.76"

# You may leave this blank to use the actual hostname
KUBELET_HOSTNAME="--hostname-override=worker1"

# location of the api-server
KUBELET_API_SERVER="--api-servers=http://10.44.59.239:8080"

##flannelの設定
master worker間の通信用にflannnelの設定を実施(etcdをインストールしたmasterのアドレス)

# vi /etc/sysconfig/flanneld
FLANNEL_ETCD_ENDPOINTS="http://10.44.59.239:2379"

##サービスの起動

# systemctl start kubelet
# systemctl start flanneld
# systemctl start docker
# systemctl start kube-scheduler
# systemctl start kube-proxy

# systemctl enable kubelet
# systemctl enable flanneld
# systemctl enable docker
# systemctl enable kube-scheduler
# systemctl enable kube-proxy

##masterからworkerの起動状況を確認

# kubectl get nodes
NAME      STATUS    AGE
master    Ready     40m
worker1   Ready     2m

※参考
CentOS7でのKubernetes クラスタ構築(master編)

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?