K8S 1.9.0二进制包部署(一)
2018-02-05 14:29
351 查看
master 192.168.254.53
node1 192.168.254.54
node2 192.168.254.55
版本信息:
k8s V1.9.0 下载https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.9.md
etcd v3.2.10
flannel v0.9.0
docker 17.05.0-ce
systemctl disable firewalld
systemctl stop firewalld
1、安装docker
先更新yum源,这里用163的源
yum install -y wget
cd /etc/yum.repos.d
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
/usr/bin/yum clean all
/usr/bin/yum makecache
更新系统
yum update
编辑生成docker的yum源
tee /etc/yum.repos.d/docker.repo <<-'EOF'
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/7/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF
查看版本
yum info docker-engine
yum install docker-engine -y
systemctl enable docker.service
systemctl start docker.service
systemctl status docker.service
2、etcd
cp etcd etcdctl /usr/bin
chmod 755 /usr/bin/etcd
chmod 755 /usr/bin/etcdctl
mkdir -p /app/etcd/data
mkdir -p /app/etcd/conf
vi /usr/lib/systemd/system/etcd.service
[Unit]
Description=Etcd Server
After=network.target
[Service]
Type=notify
WorkingDirectory=/app/etcd/data
EnvironmentFile=/app/etcd/conf/etcd.conf
ExecStart=/usr/bin/etcd
[Install]
WantedBy=multi-user.target
vi /app/etcd/conf/etcd.conf
ETCD_NAME=default
ETCD_DATA_DIR="/app/etcd/data/default.etcd"
ETCD_LISTEN_CLIENT_URLS="http://0.0.0.0:2379,http://0.0.0.0:4001";
ETCD_ADVERTISE_CLIENT_URLS="http://0.0.0.0:2379,http://0.0.0.0:4001";
systemctl daemon-reload
systemctl enable etcd.service
systemctl start etcd.service
systemctl status etcd.service
etcdctl --version
etcdctl cluster-health
etcdctl -C http://localhost:2379 cluster-health
curl -L http://localhost:2379/health
[root@testapp3 ~]# etcdctl set testkey "hello world"
hello world
[root@testapp3 ~]# etcdctl get testkey
hello world
node1 192.168.254.54
node2 192.168.254.55
版本信息:
k8s V1.9.0 下载https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.9.md
etcd v3.2.10
flannel v0.9.0
docker 17.05.0-ce
systemctl disable firewalld
systemctl stop firewalld
1、安装docker
先更新yum源,这里用163的源
yum install -y wget
cd /etc/yum.repos.d
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
/usr/bin/yum clean all
/usr/bin/yum makecache
更新系统
yum update
编辑生成docker的yum源
tee /etc/yum.repos.d/docker.repo <<-'EOF'
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/7/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF
查看版本
yum info docker-engine
yum install docker-engine -y
systemctl enable docker.service
systemctl start docker.service
systemctl status docker.service
2、etcd
cp etcd etcdctl /usr/bin
chmod 755 /usr/bin/etcd
chmod 755 /usr/bin/etcdctl
mkdir -p /app/etcd/data
mkdir -p /app/etcd/conf
vi /usr/lib/systemd/system/etcd.service
[Unit]
Description=Etcd Server
After=network.target
[Service]
Type=notify
WorkingDirectory=/app/etcd/data
EnvironmentFile=/app/etcd/conf/etcd.conf
ExecStart=/usr/bin/etcd
[Install]
WantedBy=multi-user.target
vi /app/etcd/conf/etcd.conf
ETCD_NAME=default
ETCD_DATA_DIR="/app/etcd/data/default.etcd"
ETCD_LISTEN_CLIENT_URLS="http://0.0.0.0:2379,http://0.0.0.0:4001";
ETCD_ADVERTISE_CLIENT_URLS="http://0.0.0.0:2379,http://0.0.0.0:4001";
systemctl daemon-reload
systemctl enable etcd.service
systemctl start etcd.service
systemctl status etcd.service
etcdctl --version
etcdctl cluster-health
etcdctl -C http://localhost:2379 cluster-health
curl -L http://localhost:2379/health
[root@testapp3 ~]# etcdctl set testkey "hello world"
hello world
[root@testapp3 ~]# etcdctl get testkey
hello world
相关文章推荐
- K8S 1.9.0二进制包部署(五)
- K8S 1.9.0二进制包部署(六)
- K8S 1.9.0二进制包部署(七)
- K8S 1.9.0二进制包部署(二)
- K8S 1.9.0二进制包部署(三)
- K8S 1.9.0二进制包部署(四)
- China Azure中部署Kubernetes(K8S)集群
- 使用Rancher部署K8S时需要注意的软件版本问题
- Kubernetes1.91(K8s)安装部署过程(一)--证书安装
- k8s-06-一键部署node节点
- 使用kubeadm部署k8s集群07-扩容kube-scheduler到3节点
- Centos7安装部署Kubernetes(K8s)集群
- Kubernetes(K8S)集群管理Docker容器(部署篇) 推荐
- China Azure中部署Kubernetes(K8S)集群
- k8s集群部署DNS服务发现
- k8s集群之kubernetes-dashboard和kube-dns组件部署安装
- Kubernetes(k8s)集群部署(k8s企业级Docker容器集群管理)系列之集群部署环境规划(一)
- K8S部署
- 在k8s集群中部署nginx-ingress-controller.yaml遇到的问题