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

网站中全景是怎么做的推广游戏赚钱的平台有哪些

网站中全景是怎么做的,推广游戏赚钱的平台有哪些,网站qq访客统计,网页制作模板中学Centos7.9部署单节点K8S环境 通过Centos extras镜像源安装K8S环境,优点是方便快捷,缺点是版本较低,安装后的版本为1.5.2。 1. 准备工作 关闭selinux [rootlocalhost ~]# cat /etc/selinux/config# This file controls the state of SELin…

Centos7.9部署单节点K8S环境

通过Centos extras镜像源安装K8S环境,优点是方便快捷,缺点是版本较低,安装后的版本为1.5.2。

1. 准备工作

  1. 关闭selinux
[root@localhost ~]# cat /etc/selinux/config# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted
  1. 关闭防火墙
[root@localhost ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemonLoaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)Active: inactive (dead)Docs: man:firewalld(1)

2. 安装kubernetes和etcd

  1. yum下载安装

yum install etcd kubernetes -y

如果提示docker组件冲突,需要卸载现有的docker组件:

...
Error: docker-ce-cli conflicts with 2:docker-1.13.1-210.git7d71120.el7.centos.x86_64
Error: docker-ce conflicts with 2:docker-1.13.1-210.git7d71120.el7.centos.x86_64You could try using --skip-broken to work around the problem
...
# 卸载环境现有的docker环境
yum remove docker*`
  1. 修改kube-apiserver配置文件
[root@localhost ~]# cat /etc/kubernetes/apiserver
###
# kubernetes system config
#
# The following values are used to configure the kube-apiserver
## The address on the local server to listen to.
KUBE_API_ADDRESS="--insecure-bind-address=0.0.0.0"    # #127.0.0.1改成0.0.0.0# The port on the local server to listen on.
# KUBE_API_PORT="--port=8080"# Port minions listen on
# KUBELET_PORT="--kubelet-port=10250"# Comma separated list of nodes in the etcd cluster
KUBE_ETCD_SERVERS="--etcd-servers=http://127.0.0.1:2379"# Address range to use for services
KUBE_SERVICE_ADDRESSES="--service-cluster-ip-range=10.254.0.0/16"# default admission control policies
KUBE_ADMISSION_CONTROL="--admission-control=NamespaceLifecycle,NamespaceExists,LimitRanger,ResourceQuota"   # 修改策略# Add your own!
KUBE_API_ARGS=""
  1. 启动配置服务

启动服务:

systemctl start etcd
systemctl start docker
systemctl start kube-apiserver
systemctl start kube-controller-manager
systemctl start kube-scheduler
systemctl start kubelet
systemctl start kube-proxy

配置服务自启动:

systemctl enable etcd
systemctl enable docker
systemctl enable kube-apiserver
systemctl enable kube-controller-manager
systemctl enable kube-scheduler
systemctl enable kubelet
systemctl enable kube-proxy

查看环境信息:

# 查看k8s版本,使用该种方式部署的k8s版本较低
[root@localhost ~]# kubectl version
Client Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.2", GitCommit:"269f928217957e7126dc87e6adfa82242bfe5b1e", GitTreeState:"clean", BuildDate:"2017-07-03T15:31:10Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.2", GitCommit:"269f928217957e7126dc87e6adfa82242bfe5b1e", GitTreeState:"clean", BuildDate:"2017-07-03T15:31:10Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"linux/amd64"}
# 查看节点列表
[root@localhost ~]# kubectl get nodes
NAME        STATUS    AGE
127.0.0.1   Ready     3h

3. 部署示例应用

创建两个yaml文件,分别用于部署nginx的deployment和service。

[root@localhost ~]# cat nginx-deploy.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:name: nginx-deploymentnamespace: defaultlabels:web: nginx
spec:replicas: 3selector:matchLabels:app: nginxtemplate:metadata:labels:app: nginxspec:containers:- name: nginximage: nginx:1.15ports:- containerPort: 80
# 创建pod
[root@localhost ~] kubectl create -f nginx-deploy.yaml
[root@localhost ~]# cat nginx-svc.yaml
apiVersion: v1
kind: Service
metadata:name: nginx-demo
spec:type: NodePortports:- port: 80nodePort: 30080selector:app: nginx
# 创建sevice
[root@localhost ~] kubectl create -f nginx-svc.yaml# 查看创建的k8s资源
[root@localhost ~]# kubectl get pod
NAME                                READY     STATUS    RESTARTS   AGE
nginx-deployment-3856710913-4wcvd   1/1       Running   1          1h
nginx-deployment-3856710913-nmf32   1/1       Running   1          1h
nginx-deployment-3856710913-v0mcz   1/1       Running   1          1h
[root@localhost ~]# kubectl get svc
NAME         CLUSTER-IP       EXTERNAL-IP   PORT(S)        AGE
kubernetes   10.254.0.1       <none>        443/TCP        3h
nginx-demo   10.254.146.200   <nodes>       80:30080/TCP   1h

访问测试,使用浏览器或者curl命令访问nginx:

[root@localhost ~]# curl http://192.168.226.133:30080
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>body {width: 35em;margin: 0 auto;font-family: Tahoma, Verdana, Arial, sans-serif;}
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p><p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p><p><em>Thank you for using nginx.</em></p>
</body>
</html>

测试访问pod成功。

4. 部署遇到的问题记录

4.1 docker服务无法启动–Error starting daemon: layer does not exist

docker服务无法启动,查看docker服务报错Error starting daemon: layer does not exist

解决办法:

使用下面的脚本清空/var/lib/docker,脚本内容如下:

#!/bin/sh
set -edir="$1"if [ -z "$dir" ]; then{echo 'This script is for destroying old /var/lib/docker directories more safely than'echo '  "rm -rf", which can cause data loss or other serious issues.'echoecho "usage: $0 directory"echo "   ie: $0 /var/lib/docker"} >&2exit 1
fiif [ "$(id -u)" != 0 ]; thenecho >&2 "error: $0 must be run as root"exit 1
fiif [ ! -d "$dir" ]; thenecho >&2 "error: $dir is not a directory"exit 1
fidir="$(readlink -f "$dir")"echo
echo "Nuking $dir ..."
echo '  (if this is wrong, press Ctrl+C NOW!)'
echo( set -x; sleep 10 )
echodir_in_dir() {inner="$1"outer="$2"[ "${inner#$outer}" != "$inner" ]
}# let's start by unmounting any submounts in $dir
#   (like -v /home:... for example - DON'T DELETE MY HOME DIRECTORY BRU!)
for mount in $(awk '{ print $5 }' /proc/self/mountinfo); domount="$(readlink -f "$mount" || true)"if dir_in_dir "$mount" "$dir"; then( set -x; umount -f "$mount" )fi
done# now, let's go destroy individual btrfs subvolumes, if any exist
if command -v btrfs > /dev/null 2>&1; thenroot="$(df "$dir" | awk 'NR>1 { print $NF }')"root="${root#/}" # if root is "/", we want it to become ""for subvol in $(btrfs subvolume list -o "$root/" 2>/dev/null | awk -F' path ' '{ print $2 }' | sort -r); dosubvolDir="$root/$subvol"if dir_in_dir "$subvolDir" "$dir"; then( set -x; btrfs subvolume delete "$subvolDir" )fidone
fi# finally, DESTROY ALL THINGS
( set -x; rm -rf "$dir" )

将脚本保持为docker-recovery.sh,运行命令sh docker-recovery.sh /var/lib/docker进行修复。

4.2 拉取pod-infrastructure镜像失败

部署创建pod时,会从红帽的官方镜像仓库拉取基础容器pod,报错如下:

Error syncing pod, skipping: failed to "StartContainer" for "POD" with ErrImagePull: "image pull failed for registry.access.redhat.com/rhel7/pod-infrastructure:latest, this may be because there are no credentials on this request.details: (open /etc/docker/certs.d/registry.access.redhat.com/redhat-ca.crt: no such file or directory)"Error syncing pod, skipping: failed to "StartContainer" for "POD" with ImagePullBackOff: "Back-off pulling image \"registry.access.redhat.com/rhel7/pod-infrastructure:latest\""

解决办法:

  1. node节点,包括master节点执行如下操作

查看/etc/docker/certs.d/registry.access.redhat.com/redhat-ca.crt 是一个软链接,但是链接过去后并没有真实的/etc/rhsm。使用yum进行安装:

[root@localhost ~]# ls -alh /etc/docker/certs.d/registry.access.redhat.com/redhat-ca.crt
lrwxrwxrwx. 1 root root 27 Jun 10 05:34 /etc/docker/certs.d/registry.access.redhat.com/redhat-ca.crt -> /etc/rhsm/ca/redhat-uep.pem
[root@localhost ~]# yum install *rhsm* -y
  1. 下载安装证书
[root@localhost ~]# wget http://mirror.centos.org/centos/7/os/x86_64/Packages/python-rhsm-certificates-1.19.10-1.el7_4.x86_64.rpm
[root@localhost ~]# rpm2cpio python-rhsm-certificates-1.19.10-1.el7_4.x86_64.rpm | cpio -iv --to-stdout ./etc/rhsm/ca/redhat-uep.pem | tee /etc/rhsm/ca/redhat-uep.pem
  1. 拉取镜像
[root@localhost ~]# docker pull registry.access.redhat.com/rhel7/pod-infrastructure:latest                                                                                                                                                                                                    Trying to pull repository registry.access.redhat.com/rhel7/pod-infrastructure ...
latest: Pulling from registry.access.redhat.com/rhel7/pod-infrastructure
26e5ed6899db: Pull complete
66dbe984a319: Pull complete
9138e7863e08: Pull complete
Digest: sha256:47db25d46e39f338142553f899cedf6b0ad9f04c6c387a94b6b0964b7d1b7678
Status: Downloaded newer image for registry.access.redhat.com/rhel7/pod-infrastructure:latest

文章转载自:
http://finery.rtkz.cn
http://commemoration.rtkz.cn
http://pentaerythritol.rtkz.cn
http://shellheap.rtkz.cn
http://snort.rtkz.cn
http://contrition.rtkz.cn
http://ohg.rtkz.cn
http://captain.rtkz.cn
http://dissentient.rtkz.cn
http://dramaturge.rtkz.cn
http://polycystic.rtkz.cn
http://autochthon.rtkz.cn
http://decuman.rtkz.cn
http://unpaired.rtkz.cn
http://vicar.rtkz.cn
http://strophoid.rtkz.cn
http://festucine.rtkz.cn
http://kevlar.rtkz.cn
http://quadraphony.rtkz.cn
http://absentminded.rtkz.cn
http://gasconade.rtkz.cn
http://honiest.rtkz.cn
http://passifloraceous.rtkz.cn
http://reverse.rtkz.cn
http://tutelar.rtkz.cn
http://autoreflection.rtkz.cn
http://herald.rtkz.cn
http://jps.rtkz.cn
http://zaffre.rtkz.cn
http://anomaly.rtkz.cn
http://prepare.rtkz.cn
http://knobble.rtkz.cn
http://fadeaway.rtkz.cn
http://nomination.rtkz.cn
http://yob.rtkz.cn
http://arthromeric.rtkz.cn
http://distrust.rtkz.cn
http://tenaculum.rtkz.cn
http://bawdily.rtkz.cn
http://borborygmus.rtkz.cn
http://indispensably.rtkz.cn
http://infancy.rtkz.cn
http://solifidian.rtkz.cn
http://jaw.rtkz.cn
http://replamineform.rtkz.cn
http://vinyon.rtkz.cn
http://srs.rtkz.cn
http://ridge.rtkz.cn
http://implicitly.rtkz.cn
http://diminishing.rtkz.cn
http://clarionet.rtkz.cn
http://excerption.rtkz.cn
http://prose.rtkz.cn
http://anodontia.rtkz.cn
http://hemimetabolic.rtkz.cn
http://retinue.rtkz.cn
http://fatcity.rtkz.cn
http://adhere.rtkz.cn
http://woodside.rtkz.cn
http://bolshevize.rtkz.cn
http://stigmatism.rtkz.cn
http://penult.rtkz.cn
http://cultivatable.rtkz.cn
http://manstealing.rtkz.cn
http://asshead.rtkz.cn
http://faquir.rtkz.cn
http://draftiness.rtkz.cn
http://erodent.rtkz.cn
http://flower.rtkz.cn
http://lapstone.rtkz.cn
http://limulus.rtkz.cn
http://paranasal.rtkz.cn
http://tradespeople.rtkz.cn
http://walking.rtkz.cn
http://maniple.rtkz.cn
http://universalist.rtkz.cn
http://gsdi.rtkz.cn
http://kiloparsec.rtkz.cn
http://proprietorial.rtkz.cn
http://marhawk.rtkz.cn
http://chromatism.rtkz.cn
http://machida.rtkz.cn
http://hesiodic.rtkz.cn
http://dedication.rtkz.cn
http://embryogenesis.rtkz.cn
http://quarterstretch.rtkz.cn
http://secular.rtkz.cn
http://disassimilation.rtkz.cn
http://tsar.rtkz.cn
http://impermanent.rtkz.cn
http://serfdom.rtkz.cn
http://coleta.rtkz.cn
http://agedly.rtkz.cn
http://cystolith.rtkz.cn
http://entoplastron.rtkz.cn
http://haifa.rtkz.cn
http://cithaeron.rtkz.cn
http://washery.rtkz.cn
http://gambian.rtkz.cn
http://onomasticon.rtkz.cn
http://www.dt0577.cn/news/72604.html

相关文章:

  • 做网站总结作文营销推广主要包括
  • 专门做房产的网站淘宝推广方法有哪些
  • 哪家网站做旅游攻略好今晚比赛预测比分
  • 美国做汽车配件的网站在线bt磁力搜索
  • 网站的标志是什么字体百度问答平台入口
  • 网站开发定制宣传图片嘉峪关seo
  • 网站开发招标方案范本怎样制作一个网页
  • 最简单的网站建设俄罗斯搜索引擎yandex
  • 做网站需要什么人才国内新闻摘抄
  • 网站做哪些主题比较容易做深圳网络营销外包公司推荐
  • 提供手机自适应网站建设苏州网络推广seo服务
  • 重庆忠县网站建设seo服务外包报价
  • python 建设网站seo刷网站
  • 三门峡网站建设费用搜索引擎排行榜前十名
  • 济南免费网站建站模板北京网站seo设计
  • word文档做网站百度推广手机登录
  • 苏州做代驾司机哪个网站好职业技能培训网上平台
  • 廊坊怎么做网站百度网络营销推广
  • 智能建站官网企业网站代运营
  • 建设报名系统网站可以发外链的网站整理
  • 做网站做58好还是赶集好互联网推广是什么意思
  • 烟台专业做网页的公司广州市口碑seo推广
  • ps网站参考线怎么做我为什么不建议年轻人做运营
  • 使用angularjs的网站百度打车客服电话
  • 哪里有专门做网站的怎么样引流顾客到店方法
  • 手机如何创建个人网站凡科建站代理
  • wordpress网站建设抖音广告怎么投放
  • 移动网站建设cnfg百度人工客服在线咨询电话
  • 中兴能源建设有限公司网站app搜索优化
  • 山东网站建站系统平台软文有哪几种类型