龙空技术网

Kubernets集群入门(安装---基本命令)

不伍消极 156

前言:

如今我们对“centos上安装minion”大概比较重视,兄弟们都需要知道一些“centos上安装minion”的相关知识。那么小编在网摘上网罗了一些有关“centos上安装minion””的相关内容,希望我们能喜欢,朋友们快快来学习一下吧!

一,Kubernetes安装

master 节点安装 etcd package

yum install

systemctl disable iptables-services firewalld

systemctl stop iptables-services firewalld

每个节点上修改kubernetes配置文件

vi /etc/kubernetes/config

# How the controller-manager, scheduler, and proxy find the apiserver

KUBE_MASTER="--master=;

KUBE_ETCD_SERVERS="--etcd_servers=;

Master节点上 vi /etc/kubernetes/apiserver

# The address on the local server to listen to.

KUBE_API_ADDRESS="--address=0.0.0.0"

KUBE_API_PORT="--port=8080"

# Comma separated list of nodes in the etcd cluster

#KUBE_ETCD_SERVERS="--etcd_servers=;

Master节点启动相关kubernetes服务

for SERVICES in etcd kube-apiserver kube-controller

manager kube-scheduler; do

systemctl restart $SERVICES

systemctl enable $SERVICES

systemctl status $SERVICES

done

for SERVICES in etcd kube-apiserver kube-controller

manager kube-scheduler; do

systemctl status $SERVICES

done

Node节点修改/etc/kubernetes/kubelet

###

# kubernetes kubelet (minion) config

KUBELET_ADDRESS="--address=0.0.0.0"

KUBELET_PORT="--port=10250"

KUBELET_HOSTNAME="--hostname_override=centos-minion"

KUBELET_API_SERVER="--api_servers=“

# Add your own!

KUBELET_ARGS=""

tail -f /var/log/messages |grep kube

在master节点执行kubectl get nodes

查看到节点注册成功,则表明系统安装正常

[root@centos-master yum.repos.d]# kubectl get nodes

NAME LABELS STATUS

centos-minion kubernetes.io/hostname=centos-minion Ready

[root@centos-master yum.repos.d]# kubectl cluster-info

Kubernetes master is running at

二,Kubernetes基本命令

Master上的kubectrl命令为管理集群的命令

kubectl describe --help

三,Hello world

标签: #centos上安装minion