当前位置: 首页 > news >正文

全国做暧小视频网站关键词seo是什么意思

全国做暧小视频网站,关键词seo是什么意思,win7怎么做网站服务器吗,可以做兼职的网站有哪些文章目录 1. 安装要求2. 准备环境3. 所有master节点部署keepalived3.1 安装相关包和keepalived3.2配置master节点3.3 启动和检查 4. 部署haproxy4.1 安装4.2 配置4.3 启动和检查 5. 所有节点安装Docker/kubeadm/kubelet5.1 安装Docker5.2 添加阿里云YUM软件源5.3 安装kubeadm&a…

文章目录

    • 1. 安装要求
    • 2. 准备环境
    • 3. 所有master节点部署keepalived
      • 3.1 安装相关包和keepalived
      • 3.2配置master节点
      • 3.3 启动和检查
    • 4. 部署haproxy
      • 4.1 安装
      • 4.2 配置
      • 4.3 启动和检查
    • 5. 所有节点安装Docker/kubeadm/kubelet
      • 5.1 安装Docker
      • 5.2 添加阿里云YUM软件源
      • 5.3 安装kubeadm,kubelet和kubectl
    • 6. 部署Kubernetes Master
      • 6.1 创建kubeadm配置文件
      • 6.2 在master1节点执行
    • 7.安装集群网络
    • 8、master2节点加入集群
      • 8.1 复制密钥及相关文件
      • 8.2 master2加入集群
    • 5. 加入Kubernetes Node
    • 7. 测试kubernetes集群

kubeadm是官方社区推出的一个用于快速部署kubernetes集群的工具。

这个工具能通过两条指令完成一个kubernetes集群的部署:

# 创建一个 Master 节点
$ kubeadm init# 将一个 Node 节点加入到当前集群中
$ kubeadm join <Master节点的IP和端口 >

1. 安装要求

在开始之前,部署Kubernetes集群机器需要满足以下几个条件:

  • 一台或多台机器,操作系统 CentOS7.x-86_x64
  • 硬件配置:2GB或更多RAM,2个CPU或更多CPU,硬盘30GB或更多
  • 可以访问外网,需要拉取镜像,如果服务器不能上网,需要提前下载镜像并导入节点
  • 禁止swap分区

2. 准备环境

角色IP
master1192.168.44.155
master2192.168.44.156
node1192.168.44.157
VIP(虚拟ip)192.168.44.158
# 关闭防火墙
systemctl stop firewalld
systemctl disable firewalld# 关闭selinux
sed -i 's/enforcing/disabled/' /etc/selinux/config  # 永久
setenforce 0  # 临时# 关闭swap
swapoff -a  # 临时
sed -ri 's/.*swap.*/#&/' /etc/fstab    # 永久# 根据规划设置主机名
hostnamectl set-hostname <hostname># 在master添加hosts
cat >> /etc/hosts << EOF
192.168.44.158    master.k8s.io   k8s-vip
192.168.44.155    master01.k8s.io master1
192.168.44.156    master02.k8s.io master2
192.168.44.157    node01.k8s.io   node1
EOF# 将桥接的IPv4流量传递到iptables的链
cat > /etc/sysctl.d/k8s.conf << EOF
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
EOF
sysctl --system  # 生效# 时间同步
yum install ntpdate -y
ntpdate time.windows.com

3. 所有master节点部署keepalived

3.1 安装相关包和keepalived

yum install -y conntrack-tools libseccomp libtool-ltdlyum install -y keepalived

3.2配置master节点

master1节点配置

cat > /etc/keepalived/keepalived.conf <<EOF 
! Configuration File for keepalivedglobal_defs {router_id k8s
}vrrp_script check_haproxy {script "killall -0 haproxy"interval 3weight -2fall 10rise 2
}vrrp_instance VI_1 {state MASTER interface ens33 virtual_router_id 51priority 250advert_int 1authentication {auth_type PASSauth_pass ceb1b3ec013d66163d6ab}virtual_ipaddress {192.168.44.158}track_script {check_haproxy}}
EOF

master2节点配置

cat > /etc/keepalived/keepalived.conf <<EOF 
! Configuration File for keepalivedglobal_defs {router_id k8s
}vrrp_script check_haproxy {script "killall -0 haproxy"interval 3weight -2fall 10rise 2
}vrrp_instance VI_1 {state BACKUP interface ens33 virtual_router_id 51priority 200advert_int 1authentication {auth_type PASSauth_pass ceb1b3ec013d66163d6ab}virtual_ipaddress {192.168.44.158}track_script {check_haproxy}}
EOF

3.3 启动和检查

在两台master节点都执行

# 启动keepalived
$ systemctl start keepalived.service
设置开机启动
$ systemctl enable keepalived.service
# 查看启动状态
$ systemctl status keepalived.service

启动后查看master1的网卡信息

ip a s ens33

4. 部署haproxy

4.1 安装

yum install -y haproxy

4.2 配置

两台master节点的配置均相同,配置中声明了后端代理的两个master节点服务器,指定了haproxy运行的端口为16443等,因此16443端口为集群的入口

cat > /etc/haproxy/haproxy.cfg << EOF
#---------------------------------------------------------------------
# Global settings
#---------------------------------------------------------------------
global# to have these messages end up in /var/log/haproxy.log you will# need to:# 1) configure syslog to accept network log events.  This is done#    by adding the '-r' option to the SYSLOGD_OPTIONS in#    /etc/sysconfig/syslog# 2) configure local2 events to go to the /var/log/haproxy.log#   file. A line like the following can be added to#   /etc/sysconfig/syslog##    local2.*                       /var/log/haproxy.log#log         127.0.0.1 local2chroot      /var/lib/haproxypidfile     /var/run/haproxy.pidmaxconn     4000user        haproxygroup       haproxydaemon # turn on stats unix socketstats socket /var/lib/haproxy/stats
#---------------------------------------------------------------------
# common defaults that all the 'listen' and 'backend' sections will
# use if not designated in their block
#---------------------------------------------------------------------  
defaultsmode                    httplog                     globaloption                  httplogoption                  dontlognulloption http-server-closeoption forwardfor       except 127.0.0.0/8option                  redispatchretries                 3timeout http-request    10stimeout queue           1mtimeout connect         10stimeout client          1mtimeout server          1mtimeout http-keep-alive 10stimeout check           10smaxconn                 3000
#---------------------------------------------------------------------
# kubernetes apiserver frontend which proxys to the backends
#--------------------------------------------------------------------- 
frontend kubernetes-apiservermode                 tcpbind                 *:16443option               tcplogdefault_backend      kubernetes-apiserver    
#---------------------------------------------------------------------
# round robin balancing between the various backends
#---------------------------------------------------------------------
backend kubernetes-apiservermode        tcpbalance     roundrobinserver      master01.k8s.io   192.168.44.155:6443 checkserver      master02.k8s.io   192.168.44.156:6443 check
#---------------------------------------------------------------------
# collection haproxy statistics message
#---------------------------------------------------------------------
listen statsbind                 *:1080stats auth           admin:awesomePasswordstats refresh        5sstats realm          HAProxy\ Statisticsstats uri            /admin?stats
EOF

4.3 启动和检查

两台master都启动

# 设置开机启动
$ systemctl enable haproxy
# 开启haproxy
$ systemctl start haproxy
# 查看启动状态
$ systemctl status haproxy

检查端口

netstat -lntup|grep haproxy

5. 所有节点安装Docker/kubeadm/kubelet

Kubernetes默认CRI(容器运行时)为Docker,因此先安装Docker。

5.1 安装Docker

$ wget https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo -O /etc/yum.repos.d/docker-ce.repo
$ yum -y install docker-ce-18.06.1.ce-3.el7
$ systemctl enable docker && systemctl start docker
$ docker --version
Docker version 18.06.1-ce, build e68fc7a
$ cat > /etc/docker/daemon.json << EOF
{"registry-mirrors": ["https://b9pmyelo.mirror.aliyuncs.com"]
}
EOF

5.2 添加阿里云YUM软件源

$ cat > /etc/yum.repos.d/kubernetes.repo << EOF
[kubernetes]
name=Kubernetes
baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=0
repo_gpgcheck=0
gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg
EOF

5.3 安装kubeadm,kubelet和kubectl

由于版本更新频繁,这里指定版本号部署:

$ yum install -y kubelet-1.16.3 kubeadm-1.16.3 kubectl-1.16.3
$ systemctl enable kubelet

6. 部署Kubernetes Master

6.1 创建kubeadm配置文件

在具有vip的master上操作,这里为master1

$ mkdir /usr/local/kubernetes/manifests -p$ cd /usr/local/kubernetes/manifests/$ vi kubeadm-config.yamlapiServer:certSANs:- master1- master2- master.k8s.io- 192.168.44.158- 192.168.44.155- 192.168.44.156- 127.0.0.1extraArgs:authorization-mode: Node,RBACtimeoutForControlPlane: 4m0s
apiVersion: kubeadm.k8s.io/v1beta1
certificatesDir: /etc/kubernetes/pki
clusterName: kubernetes
controlPlaneEndpoint: "master.k8s.io:16443"
controllerManager: {}
dns: type: CoreDNS
etcd:local:    dataDir: /var/lib/etcd
imageRepository: registry.aliyuncs.com/google_containers
kind: ClusterConfiguration
kubernetesVersion: v1.16.3
networking: dnsDomain: cluster.local  podSubnet: 10.244.0.0/16serviceSubnet: 10.1.0.0/16
scheduler: {}

6.2 在master1节点执行

$ kubeadm init --config kubeadm-config.yaml

按照提示配置环境变量,使用kubectl工具:

mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
$ kubectl get nodes
$ kubectl get pods -n kube-system

按照提示保存以下内容,一会要使用:

kubeadm join master.k8s.io:16443 --token jv5z7n.3y1zi95p952y9p65 \--discovery-token-ca-cert-hash sha256:403bca185c2f3a4791685013499e7ce58f9848e2213e27194b75a2e3293d8812 \--control-plane 

查看集群状态

kubectl get cskubectl get pods -n kube-system

7.安装集群网络

从官方地址获取到flannel的yaml,在master1上执行

mkdir flannel
cd flannel
wget -c https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml

安装flannel网络

kubectl apply -f kube-flannel.yml 

检查

kubectl get pods -n kube-system

8、master2节点加入集群

8.1 复制密钥及相关文件

从master1复制密钥及相关文件到master2

# ssh root@192.168.44.156 mkdir -p /etc/kubernetes/pki/etcd# scp /etc/kubernetes/admin.conf root@192.168.44.156:/etc/kubernetes# scp /etc/kubernetes/pki/{ca.*,sa.*,front-proxy-ca.*} root@192.168.44.156:/etc/kubernetes/pki# scp /etc/kubernetes/pki/etcd/ca.* root@192.168.44.156:/etc/kubernetes/pki/etcd

8.2 master2加入集群

执行在master1上init后输出的join命令,需要带上参数--control-plane表示把master控制节点加入集群

kubeadm join master.k8s.io:16443 --token ckf7bs.30576l0okocepg8b     --discovery-token-ca-cert-hash sha256:19afac8b11182f61073e254fb57b9f19ab4d798b70501036fc69ebef46094aba --control-plane

检查状态

kubectl get nodekubectl get pods --all-namespaces

5. 加入Kubernetes Node

在node1上执行

向集群添加新节点,执行在kubeadm init输出的kubeadm join命令:

kubeadm join master.k8s.io:16443 --token ckf7bs.30576l0okocepg8b     --discovery-token-ca-cert-hash sha256:19afac8b11182f61073e254fb57b9f19ab4d798b70501036fc69ebef46094aba

集群网络重新安装,因为添加了新的node节点

检查状态

kubectl get nodekubectl get pods --all-namespaces

7. 测试kubernetes集群

在Kubernetes集群中创建一个pod,验证是否正常运行:

$ kubectl create deployment nginx --image=nginx
$ kubectl expose deployment nginx --port=80 --type=NodePort
$ kubectl get pod,svc

访问地址:http://NodeIP:Port


文章转载自:
http://cornstalk.c7496.cn
http://apery.c7496.cn
http://ess.c7496.cn
http://oceanaut.c7496.cn
http://komi.c7496.cn
http://carrie.c7496.cn
http://heterotrophic.c7496.cn
http://nejd.c7496.cn
http://bedsheet.c7496.cn
http://geophagy.c7496.cn
http://cushiony.c7496.cn
http://trochee.c7496.cn
http://irremovability.c7496.cn
http://rhythmization.c7496.cn
http://neurectomy.c7496.cn
http://trixie.c7496.cn
http://readjustment.c7496.cn
http://cycloserine.c7496.cn
http://apollyon.c7496.cn
http://numeric.c7496.cn
http://salvage.c7496.cn
http://felucca.c7496.cn
http://gambe.c7496.cn
http://theologise.c7496.cn
http://siu.c7496.cn
http://xiphosuran.c7496.cn
http://quagmire.c7496.cn
http://scua.c7496.cn
http://phycocyan.c7496.cn
http://masculinity.c7496.cn
http://bumkin.c7496.cn
http://hyrax.c7496.cn
http://tubulate.c7496.cn
http://chickenlivered.c7496.cn
http://kia.c7496.cn
http://sanscrit.c7496.cn
http://indissoluble.c7496.cn
http://disseize.c7496.cn
http://pyrenoid.c7496.cn
http://supertype.c7496.cn
http://alular.c7496.cn
http://workbench.c7496.cn
http://checkless.c7496.cn
http://commendatory.c7496.cn
http://turgor.c7496.cn
http://crissa.c7496.cn
http://issei.c7496.cn
http://tenement.c7496.cn
http://restyle.c7496.cn
http://eom.c7496.cn
http://unesco.c7496.cn
http://ceremonialize.c7496.cn
http://dyspnoea.c7496.cn
http://parthenos.c7496.cn
http://crimpy.c7496.cn
http://indiscussible.c7496.cn
http://vomitus.c7496.cn
http://gaize.c7496.cn
http://souchong.c7496.cn
http://coypu.c7496.cn
http://autarkist.c7496.cn
http://schlemiel.c7496.cn
http://lipping.c7496.cn
http://nuttily.c7496.cn
http://kaolin.c7496.cn
http://ennead.c7496.cn
http://homoiothermous.c7496.cn
http://indecomposable.c7496.cn
http://whither.c7496.cn
http://electroduct.c7496.cn
http://concretely.c7496.cn
http://aureus.c7496.cn
http://objectivize.c7496.cn
http://discretion.c7496.cn
http://taken.c7496.cn
http://capitate.c7496.cn
http://salomonian.c7496.cn
http://anxiety.c7496.cn
http://highlander.c7496.cn
http://mrbm.c7496.cn
http://evanishment.c7496.cn
http://talnakhite.c7496.cn
http://intravascular.c7496.cn
http://mellowness.c7496.cn
http://questionmaster.c7496.cn
http://advertizement.c7496.cn
http://nongraduate.c7496.cn
http://trichromat.c7496.cn
http://slippery.c7496.cn
http://smoothie.c7496.cn
http://excretory.c7496.cn
http://fret.c7496.cn
http://classmate.c7496.cn
http://waggon.c7496.cn
http://prosthodontia.c7496.cn
http://illuvium.c7496.cn
http://fatherhood.c7496.cn
http://underwater.c7496.cn
http://urethroscopy.c7496.cn
http://pulsimeter.c7496.cn
http://www.zhongyajixie.com/news/71702.html

相关文章:

  • 网站建设服务器和空间费seo技术培训泰州
  • 长沙公司做网站大概多少钱电商推广
  • 怎么做网站卖车微信营销模式有哪些
  • 制作网站首页教案优化器
  • 网站是用什么编程语言编写的今日新闻头条新闻最新
  • 专业网站建设模块维护网络推广站
  • 株洲网站seo优化价格泰安百度推广代理商
  • dw动态网站制作流程友情链接是外链吗
  • 有网站制作app要多长时间百度官网认证价格
  • 版权申请网站个人能接广告联盟吗
  • 福建省环保厅网站建设项目验收百度竞价推广
  • 企业网站建设物美价廉新闻头条最新
  • 巢湖网站建设公司培训seo
  • 高邮建设银行网站软文推广文章范文
  • 网站开发与网站设计区别营销方案怎么写
  • seo搜索优化推广手机优化软件哪个好
  • 竞网做的网站地推拉新接单平台
  • 网站运营技巧网站交易网
  • 淘宝请人做网站靠谱吗电商网站怎样优化
  • 网站建设和网站设计百度网址查询
  • 做网站的时候宽高项目推广方案怎么写
  • soho做网站多少钱百度咨询电话人工台
  • 网站建设改革情况汇报邯郸网站优化公司
  • 网站设计的标准青海百度关键词seo
  • 建站售后服务网络网站
  • 零基础做地方门户网站重庆seo公司排名
  • 企业网站建设计划表免费网站java源码大全
  • 建立动态网站的目的新闻内容摘抄
  • 安娜尔返利机器人怎么做网站百度精准推广
  • wordpress做管理网站百度一下1688