1、kube-apiserver
:是集群的统一入口,各组件协调者,所有对象资源的增删改查和监听操 作都交给 APIServer 处理后再提交给 Etcd 存储;
2、kube-controller-manager
:处理群集中常规后台任务,一个资源对应一个控制器,而 controller-manager 就是负责管理这些控制器的;
3、kube-scheduler
:根据调度算法为新创建的 Pod 选择一个 Node 节点,可以任意部署,可以部署在同一个节点上,也可以部署在不同节点上。
4、kube-bootstrap
:用户绑定到系统群集的角色,用于master控制node节点,在master节点上创建,推送给node节点,node节点使用该用户像master发送颁发证书请求
1、kubelet
:是master在node节点上的agent,可以管理本机运行容器的生命周期,例如创建容器、Pod挂载数据卷、下载secret、获取容器和节点状态等工作,kubelet 将每个 Pod转换成一组容器。
2、kube-proxy
:在 node节点上实现 Pod网络代理,维护网络规划和四层负载均衡工作。
3、docker
:容器运行环境
部署etcd群集----》》部署flannel容器群集网络----》》部署master节点----》》部署node节点
参考上篇博客ETCD群集,点此跳
flannel部署步骤如下:
[root@k8s_master ~]# /opt/etcd/bin/etcdctl --ca-file=/opt/etcd/ssl/ca.pem --cert-file=/opt/etcd/ssl/server.pem --key-file=/opt/etcd/ssl/server-key.pem --endpoints="https://192.168.142.220:2379,https://192.168.5.20:2379,https://192.168.5.30:2379" set /coreos.com/network/config '{"Network":"172.17.0.0/16","Backend":{"Type":"vxlan"}}'
2个node节点上安装docker引擎
Docker-ce版部署,点此跳
2个node节点解压安装flannel二进制源码包,源码包下载地址:https://github.com/coreos/flannel/releases
tar zxvf flannel-v0.10.0-linux-amd64.tar.gz
##创建目录
mkdir -p /opt/kubernetes/{cfg,ssl,bin}
##移动flanneld到工作目录
mv flanneld mk-docker-opts.sh /opt/kubernetes/bin/
cat <<EOF >/opt/kubernetes/cfg/flanneld.cfg
FLANNEL_OPTIONS="--etcd-endpoints=https://192.168.5.10:2379,https://192.168.5.20:2379,https://192.168.5.30:2379 \
-etcd-cafile=/opt/etcd/ssl/ca.pem \
-etcd-certfile=/opt/etcd/ssl/server.pem \
-etcd-keyfile=/opt/etcd/ssl/server-key.pem
EOF
cat <<EOF >/usr/lib/systemd/system/flanneld.service
[Unit]
Description=Flanneld overlay address etcd agent
After=network-online.target network.target
Before=docker.service
[Service]
Type=notify
EnvironmentFile=/opt/kubernetes/cfg/flanneld.cfg
ExecStart=/opt/kubernetes/bin/flanneld --ip-masq \$FLANNEL_OPTIONS
ExecStartPost=/opt/kubernetes/bin/mk-docker-opts.sh -k DOCKER_NETWORK_OPTIONS -d /run/flannel/subnet.env
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
chmod +x /usr/lib/systemd/system/flanneld.service
systemctl start flanneld.service
systemctl enable flanneld.service
systemctl status flanneld.service
vim /usr/lib/systemd/system/docker.service
##13行添加
EnvironmentFile=/run/flannel/subnet.env
##修改14行
ExecStart=/usr/bin/dockerd $DOCKER_NETWORK_OPTIONS(添加该变量,加入flannel网络中) -H fd:// --containerd=/run/containerd/containerd.sock
cat /run/flannel/subnet.env
systemctl daemon-reload
systemctl restart docker
##2个节点都安装容器
docker run -it centos:7 /bin/bash
yum install -y net-tools
##node1容器ip
[root@ae25456150cb /]# ifconfig | sed -n '2p'|awk '{print $2}'
172.17.53.2
##noede2容器ip
[root@5f9a085e6bbd /]# ifconfig | sed -n '2p'|awk '{print $2}'
172.17.20.2
###测试联通性
[root@ae25456150cb /]# ping 172.17.20.2
PING 172.17.20.2 (172.17.20.2) 56(84) bytes of data.
64 bytes from 172.17.20.2: icmp_seq=1 ttl=62 time=1.12 ms
64 bytes from 172.17.20.2: icmp_seq=2 ttl=62 time=1.04 ms
64 bytes from 172.17.20.2: icmp_seq=3 ttl=62 time=1.09 ms
^C
--- 172.17.20.2 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 1.041/1.088/1.128/0.035 ms
##创建证书存放目录
[root@k8s_master ~]# mkdir /root/k8s-cert
[root@k8s_master ~]# cd /root/k8s-cert
##创建证书生成脚本
[root@k8s_master k8s-cert]# vi k8s-cert.sh
###添加以下内容
cat > ca-config.json <<EOF
{
"signing": {
"default": {
"expiry": "87600h"
},
"profiles": {
"kubernetes": {
"expiry": "87600h",
"usages": [
"signing",
"key encipherment",
"server auth",
"client auth"
]
}
}
}
}
EOF
cat > ca-csr.json <<EOF
{
"CN": "kubernetes",
"key": {
"algo": "rsa",
"size": 2048
},
"names": [
{
"C": "CN",
"L": "Beijing",
"ST": "Beijing",
"O": "k8s",
"OU": "System"
}
]
}
EOF
cfssl gencert -initca ca-csr.json | cfssljson -bare ca -
#-----------------------
cat > server-csr.json <<EOF
{
"CN": "kubernetes",
"hosts": [
"10.0.0.1",
"127.0.0.1",
"192.168.5.10",
"192.168.5.11",
"192.168.5.100",
"192.168.5.12",
"192.168.5.13",
"kubernetes",
"kubernetes.default",
"kubernetes.default.svc",
"kubernetes.default.svc.cluster",
"kubernetes.default.svc.cluster.local"
],
"key": {
"algo": "rsa",
"size": 2048
},
"names": [
{
"C": "CN",
"L": "BeiJing",
"ST": "BeiJing",
"O": "k8s",
"OU": "System"
}
]
}
EOF
cfssl gencert -ca=ca.pem -ca-key=ca-key.pem -config=ca-config.json -profile=kubernetes server-csr.json | cfssljson -bare server
#-----------------------
cat > admin-csr.json <<EOF
{
"CN": "admin",
"hosts": [],
"key": {
"algo": "rsa",
"size": 2048
},
"names": [
{
"C": "CN",
"L": "BeiJing",
"ST": "BeiJing",
"O": "system:masters",
"OU": "System"
}
]
}
EOF
cfssl gencert -ca=ca.pem -ca-key=ca-key.pem -config=ca-config.json -profile=kubernetes admin-csr.json | cfssljson -bare admin
#-----------------------
cat > kube-proxy-csr.json <<EOF
{
"CN": "system:kube-proxy",
"hosts": [],
"key": {
"algo": "rsa",
"size": 2048
},
"names": [
{
"C": "CN",
"L": "BeiJing",
"ST": "BeiJing",
"O": "k8s",
"OU": "System"
}
]
}
EOF
cfssl gencert -ca=ca.pem -ca-key=ca-key.pem -config=ca-config.json -profile=kubernetes kube-proxy-csr.json | cfssljson -bare kube-proxy
###执行脚本
[root@k8s_master k8s-cert]# bash k8s-cert.sh
##此时会生成8个证书
[root@k8s_master k8s-cert]# ls *.pem
admin-key.pem admin.pem ca-key.pem ca.pem kube-proxy-key.pem kube-proxy.pem server-key.pem server.pem
[root@k8s_master k8s-cert]# mkdir -p /opt/kubernetes/{bin,ssl,cfg}
##复制证书到存放点
[root@k8s_master k8s-cert]# cp -p *.pem /opt/kubernetes/ssl/
[root@k8s_master k8s-cert]# ls /opt/kubernetes/ssl/
admin-key.pem admin.pem ca-key.pem ca.pem kube-proxy-key.pem kube-proxy.pem server-key.pem server.pem
[root@k8s_master bin]# tar zxvf kubernetes-server-linux-amd64.tar.gz
[root@k8s_master ~]# cd kubernetes/server/bin/
##复制关键命令道存放点
[root@k8s_master bin]# cp kube-apiserver kubectl kube-controller-manager kube-scheduler kube-proxy kubelet /opt/kubernetes/bin/
[root@k8s_master cfg]# cd /opt/kubernetes/cfg
##生成序列号
[root@k8s_master cfg]# export BOOTSTRAP_TOKEN=$(head -c 16 /dev/urandom | od -An -t x | tr -d ' ')
[root@k8s_master cfg]# echo $BOOTSTRAP_TOKEN
c345888c7d4ffb7eacc5fdd56bef72c1
##创建token文件
[root@k8s_master cfg]# cat > token.csv << EOF
> ${BOOTSTRAP_TOKEN},kubelet-bootstrap,10001,"system:kubelet-bootstrap"
> EOF
[root@k8s_master cfg]# vi apiserver.sh
##添加以下内容
#!/bin/bash
MASTER_ADDRESS=$1
ETCD_SERVERS=$2
cat <<EOF >/opt/kubernetes/cfg/kube-apiserver
KUBE_APISERVER_OPTS="--logtostderr=true \\
--v=4 \\
--etcd-servers=${ETCD_SERVERS} \\
--bind-address=${MASTER_ADDRESS} \\
--secure-port=6443 \\
--advertise-address=${MASTER_ADDRESS} \\
--allow-privileged=true \\
--service-cluster-ip-range=10.0.0.0/24 \\
--enable-admission-plugins=NamespaceLifecycle,LimitRanger,ServiceAccount,ResourceQuota,NodeRestriction \\
--authorization-mode=RBAC,Node \\
--kubelet-https=true \\
--enable-bootstrap-token-auth \\
--token-auth-file=/opt/kubernetes/cfg/token.csv \\
--service-node-port-range=30000-50000 \\
--tls-cert-file=/opt/kubernetes/ssl/server.pem \\
--tls-private-key-file=/opt/kubernetes/ssl/server-key.pem \\
--client-ca-file=/opt/kubernetes/ssl/ca.pem \\
--service-account-key-file=/opt/kubernetes/ssl/ca-key.pem \\
--etcd-cafile=/opt/etcd/ssl/ca.pem \\
--etcd-certfile=/opt/etcd/ssl/server.pem \\
--etcd-keyfile=/opt/etcd/ssl/server-key.pem"
EOF
cat <<EOF >/usr/lib/systemd/system/kube-apiserver.service
[Unit]
Description=Kubernetes API Server
Documentation=https://github.com/kubernetes/kubernetes
[Service]
EnvironmentFile=-/opt/kubernetes/cfg/kube-apiserver
ExecStart=/opt/kubernetes/bin/kube-apiserver \$KUBE_APISERVER_OPTS
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable kube-apiserver
systemctl restart kube-apiserver
[root@k8s_master cfg]# bash apiserver.sh 192.168.5.10 https://192.168.5.10:2379,https://192.168.5.20:2379,https://192.168.5.30:2379
##检查服务进程是否开启
[root@k8s_master cfg]# ps aux | grep kube-apiserver
root 52113 19.7 8.3 397232 313124 ? Ssl 23:30 0:10 /opt/kubernetes/bin/kube-apiserver --logtostderr=true --v=4 --etcd-servers=https://192.168.5.10:2379,https://192.168.5.20:2379,https://192.168.5.30:2379
......省略
[root@k8s_master cfg]# vi scheduler.sh
##添加以下内容
#!/bin/bash
MASTER_ADDRESS=$1
cat <<EOF >/opt/kubernetes/cfg/kube-scheduler
KUBE_SCHEDULER_OPTS="--logtostderr=true \\
--v=4 \\
--master=${MASTER_ADDRESS}:8080 \\
--leader-elect"
EOF
cat <<EOF >/usr/lib/systemd/system/kube-scheduler.service
[Unit]
Description=Kubernetes Scheduler
Documentation=https://github.com/kubernetes/kubernetes
[Service]
EnvironmentFile=-/opt/kubernetes/cfg/kube-scheduler
ExecStart=/opt/kubernetes/bin/kube-scheduler \$KUBE_SCHEDULER_OPTS
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable kube-scheduler
systemctl restart kube-scheduler
[root@k8s_master cfg]# bash scheduler.sh 127.0.0.1
Created symlink from /etc/systemd/system/multi-user.target.wants/kube-scheduler.service to /usr/lib/systemd/system/kube-scheduler.service.
[root@k8s_master cfg]# vi controller-manager.sh
##添加以下内容
#!/bin/bash
MASTER_ADDRESS=$1
cat <<EOF >/opt/kubernetes/cfg/kube-controller-manager
KUBE_CONTROLLER_MANAGER_OPTS="--logtostderr=true \\
--v=4 \\
--master=${MASTER_ADDRESS}:8080 \\
--leader-elect=true \\
--address=127.0.0.1 \\
--service-cluster-ip-range=10.0.0.0/24 \\
--cluster-name=kubernetes \\
--cluster-signing-cert-file=/opt/kubernetes/ssl/ca.pem \\
--cluster-signing-key-file=/opt/kubernetes/ssl/ca-key.pem \\
--root-ca-file=/opt/kubernetes/ssl/ca.pem \\
--service-account-private-key-file=/opt/kubernetes/ssl/ca-key.pem \\
--experimental-cluster-signing-duration=87600h0m0s"
EOF
cat <<EOF >/usr/lib/systemd/system/kube-controller-manager.service
[Unit]
Description=Kubernetes Controller Manager
Documentation=https://github.com/kubernetes/kubernetes
[Service]
EnvironmentFile=-/opt/kubernetes/cfg/kube-controller-manager
ExecStart=/opt/kubernetes/bin/kube-controller-manager \$KUBE_CONTROLLER_MANAGER_OPTS
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable kube-controller-manager
systemctl restart kube-controller-manager
[root@k8s_master cfg]# bash controller-manager.sh 127.0.0.1
Created symlink from /etc/systemd/system/multi-user.target.wants/kube-controller-manager.service to /usr/lib/systemd/system/kube-controller-manager.service.
[root@k8s_master cfg]# /opt/kubernetes/bin/kubectl get cs
NAME STATUS MESSAGE ERROR
scheduler Healthy ok
controller-manager Healthy ok
etcd-1 Healthy {"health":"true"}
etcd-0 Healthy {"health":"true"}
etcd-2 Healthy {"health":"true"}
##将命令写入系统变量,方便使用
[root@k8s_master cfg]# echo 'PATH=/opt/kubernetes/bin/:$PATH' >> /etc/profile
[root@k8s_master cfg]# source /etc/profile
[root@k8s_master bin]# cd /opt/kubernetes/bin/
[root@k8s_master bin]# scp kubelet kube-proxy root@192.168.5.20:/opt/kubernetes/bin/
[root@k8s_master bin]# scp kubelet kube-proxy root@192.168.5.30:/opt/kubernetes/bin/
[root@k8s_master ~]# mkdir /root/kubeconfig
[root@k8s_master ~]# vi /root/kubeconfig/kubeconfig.sh
###添加以下内容
APISERVER=$1
SSL_DIR=$2
# 创建kubelet bootstrapping kubeconfig
export KUBE_APISERVER="https://$APISERVER:6443"
# 设置集群参数
kubectl config set-cluster kubernetes \
--certificate-authority=$SSL_DIR/ca.pem \
--embed-certs=true \
--server=${KUBE_APISERVER} \
--kubeconfig=bootstrap.kubeconfig
# 设置客户端认证参数
kubectl config set-credentials kubelet-bootstrap \
--token=c345888c7d4ffb7eacc5fdd56bef72c1 \
--kubeconfig=bootstrap.kubeconfig
# 设置上下文参数
kubectl config set-context default \
--cluster=kubernetes \
--user=kubelet-bootstrap \
--kubeconfig=bootstrap.kubeconfig
# 设置默认上下文
kubectl config use-context default --kubeconfig=bootstrap.kubeconfig
#----------------------
# 创建kube-proxy kubeconfig文件
kubectl config set-cluster kubernetes \
--certificate-authority=$SSL_DIR/ca.pem \
--embed-certs=true \
--server=${KUBE_APISERVER} \
--kubeconfig=kube-proxy.kubeconfig
kubectl config set-credentials kube-proxy \
--client-certificate=$SSL_DIR/kube-proxy.pem \
--client-key=$SSL_DIR/kube-proxy-key.pem \
--embed-certs=true \
--kubeconfig=kube-proxy.kubeconfig
kubectl config set-context default \
--cluster=kubernetes \
--user=kube-proxy \
--kubeconfig=kube-proxy.kubeconfig
kubectl config use-context default --kubeconfig=kube-proxy.kubeconfig
[root@k8s_master kubeconfig]# bash kubeconfig 192.168.5.10 /root/k8s-cert
Cluster "kubernetes" set.
User "kubelet-bootstrap" set.
Context "default" created.
Switched to context "default".
Cluster "kubernetes" set.
User "kube-proxy" set.
Context "default" created.
Switched to context "default".
[root@k8s_master kubeconfig]# ls
bootstrap.kubeconfig kubeconfig kube-proxy.kubeconfig
[root@k8s_master kubeconfig]# scp kube-proxy.kubeconfig bootstrap.kubeconfig root@192.168.5.20:/opt/kubernetes/cfg/
[root@k8s_master kubeconfig]# kubectl create clusterrolebinding kubelet-bootstrap \
> --clusterrole=system:node-bootstrapper \
> --user=kubelet-bootstrap
[root@k8s_node1 cfg]# cd /opt/kubernetes/cfg/
[root@k8s_node1 cfg]# vi kubelet.sh
##添加以下内容
#!/bin/bash
NODE_ADDRESS=$1
DNS_SERVER_IP=${2:-"10.0.0.2"}
cat <<EOF >/opt/kubernetes/cfg/kubelet
KUBELET_OPTS="--logtostderr=true \\
--v=4 \\
--hostname-override=${NODE_ADDRESS} \\
--kubeconfig=/opt/kubernetes/cfg/kubelet.kubeconfig \\
--bootstrap-kubeconfig=/opt/kubernetes/cfg/bootstrap.kubeconfig \\
--config=/opt/kubernetes/cfg/kubelet.config \\
--cert-dir=/opt/kubernetes/ssl \\
--pod-infra-container-image=registry.cn-hangzhou.aliyuncs.com/google-containers/pause-amd64:3.0"
EOF
cat <<EOF >/opt/kubernetes/cfg/kubelet.config
kind: KubeletConfiguration
apiVersion: kubelet.config.k8s.io/v1beta1
address: ${NODE_ADDRESS}
port: 10250
readOnlyPort: 10255
cgroupDriver: cgroupfs
clusterDNS:
- ${DNS_SERVER_IP}
clusterDomain: cluster.local.
failSwapOn: false
authentication:
anonymous:
enabled: true
EOF
cat <<EOF >/usr/lib/systemd/system/kubelet.service
[Unit]
Description=Kubernetes Kubelet
After=docker.service
Requires=docker.service
[Service]
EnvironmentFile=/opt/kubernetes/cfg/kubelet
ExecStart=/opt/kubernetes/bin/kubelet \$KUBELET_OPTS
Restart=on-failure
KillMode=process
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable kubelet
systemctl restart kubelet
[root@k8s_node1 cfg]# bash kubelet.sh 192.168.5.20
Created symlink from /etc/systemd/system/multi-user.target.wants/kubelet.service to /usr/lib/systemd/system/kubelet.service.
[root@k8s_node1 cfg]# netstat -natp | grep kubelet
tcp 0 0 192.168.5.20:60028 192.168.5.10:6443 ESTABLISHED 61552/kubelet
##查看请求
[root@k8s_master kubeconfig]# kubectl get csr
NAME AGE REQUESTOR CONDITION
node-csr-fW-g9h9PRMbM3HfS_1CpUsNktiK0zNxRBI-qcmB5sLk 4m12s kubelet-bootstrap Pending
###同意请求,颁发证书
[root@k8s_master kubeconfig]# kubectl certificate approve node-csr-fW-g9h9PRMbM3HfS_1CpUsNktiK0zNxRBI-qcmB5sLk
##再次查看请求,发现处于Approved状态
[root@k8s_master kubeconfig]# kubectl get csr
NAME AGE REQUESTOR CONDITION
node-csr-fW-g9h9PRMbM3HfS_1CpUsNktiK0zNxRBI-qcmB5sLk 8m39s kubelet-bootstrap Approved,Issued
##此时node1节点已经加入到群集中
[root@k8s_master kubeconfig]# kubectl get nodes
NAME STATUS ROLES AGE VERSION
192.168.5.20 Ready <none> 119s v1.12.3
[root@k8s_node1 cfg]# vi /opt/kubernetes/cfg/proxy.sh
##添加以下内容
#!/bin/bash
NODE_ADDRESS=$1
cat <<EOF >/opt/kubernetes/cfg/kube-proxy
KUBE_PROXY_OPTS="--logtostderr=true \\
--v=4 \\
--hostname-override=${NODE_ADDRESS} \\
--cluster-cidr=10.0.0.0/24 \\
--proxy-mode=ipvs \\
--kubeconfig=/opt/kubernetes/cfg/kube-proxy.kubeconfig"
EOF
cat <<EOF >/usr/lib/systemd/system/kube-proxy.service
[Unit]
Description=Kubernetes Proxy
After=network.target
[Service]
EnvironmentFile=-/opt/kubernetes/cfg/kube-proxy
ExecStart=/opt/kubernetes/bin/kube-proxy \$KUBE_PROXY_OPTS
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable kube-proxy
systemctl restart kube-proxy
####启动服务
[root@k8s_node1 cfg]# bash proxy.sh 192.168.5.20
Created symlink from /etc/systemd/system/multi-user.target.wants/kube-proxy.service to /usr/lib/systemd/system/kube-proxy.service.
##检查是否启动
[root@k8s_node1 cfg]# netstat -natp | grep proxy
tcp 0 0 127.0.0.1:10249 0.0.0.0:* LISTEN 64440/kube-proxy
tcp 0 0 192.168.5.20:60888 192.168.5.10:6443 ESTABLISHED 64440/kube-proxy
tcp6 0 0 :::10256 :::* LISTEN 64440/kube-proxy
[root@k8s_node1 cfg]# scp -r /opt/kubernetes/ root@192.168.5.30:/opt
##复制启动文件到node2
[root@k8s_node1 cfg]# cd /usr/lib/systemd/system
[root@k8s_node1 system]# scp kube* root@192.168.5.30:/usr/lib/systemd/system/
##删除复制过来的证书,node2会自行申请
[root@k8s_node1 system]# rm -rf /opt/kubernetes/ssl/*
##修改kubelet
[root@k8s_node1sy stem]# vi /opt/kubernetes/cfg/kubelet
--hostname-override=192.168.5.30 \ ##修改ip为node2地址,192.168.5.30
##修改kubelet.config 文件
[root@k8s_node1 kubernetes]# vi /opt/kubernetes/cfg/kubelet.config
address: 192.168.5.30 ##修改ip为node2地址,192.168.5.30
##修改kube-proxy
[root@k8s_node2 system]# vi /opt/kubernetes/cfg/kube-proxy
--hostname-override=192.168.5.30 \ ##修改ip为node2地址,192.168.5.30
[root@k8s_node2 system]# systemctl start kubelet
[root@k8s_node2 system]# systemctl enable kubelet
[root@k8s_node2 system]# systemctl start kube-proxy.service
[root@k8s_node2 system]# systemctl enable kube-proxy.service
[root@k8s_master kubeconfig]# kubectl get csr
NAME AGE REQUESTOR CONDITION
node-csr-Tm1PmuZZFV0wyMrs3RV3SCpr080CRK9d9LnRHGg2jGE 4m12s kubelet-bootstrap Pending
node-csr-fW-g9h9PRMbM3HfS_1CpUsNktiK0zNxRBI-qcmB5sLk 44m kubelet-bootstrap Approved,Issued
##同意请求
[root@k8s_master kubeconfig]# kubectl certificate approve node-csr-Tm1PmuZZFV0wyMrs3RV3SCpr080CRK9d9LnRHGg2jGE
[root@k8s_master kubeconfig]# kubectl get nodes
NAME STATUS ROLES AGE VERSION
192.168.5.20 Ready <none> 39m v1.12.3
192.168.5.30 Ready <none> 63s v1.12.3