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

dede自动生成网站地图wordpress 代码 格式

dede自动生成网站地图,wordpress 代码 格式,jquery网站引导插件,网站开发种类kubernetes中的资源 ⭐️ k8s中所有的内容都抽象为资源,资源实列化之后,叫做对象 1️⃣名称空间级别 ⭐️ kubeadm在执行k8s的pod的时候会在kube-system这个名称空间下执行,所以说当你kubectl get pod 的时候是查看不到的查看的是默认的po…

kubernetes中的资源

⭐️ k8s中所有的内容都抽象为资源,资源实列化之后,叫做对象

1️⃣名称空间级别

⭐️ kubeadm在执行k8spod的时候会在kube-system这个名称空间下执行,所以说当你kubectl get pod 的时候是查看不到的查看的是默认的pod

  • 工作负载型资源( workload ):PodReplicaSetDeploymentStatefulSetDaemonSet、 Job、CronJob ( ReplicationControllerv1.11 版本被废弃)
  • 服务发现及负载均衡型资源( ServiceDi scovery LoadBalance ): ServiceIngress、 …
  • 配置与存储型资源: Volume( 存储卷)、CSI( 容器存储接口,可以扩展各种各样的第三方存储卷)
  • 特殊类型的存储卷: ConfigMap( 当配置中心来使用的资源类型)、Secret (保存敏感数据)、
  • DownwardAPI (把外部环境中的信息输出给容器)
2️⃣ 集群级别

⭐️ 不管在那个名称空间都可见

Namespace(命名空间)、 NodeRoleClusterRoleRoleBindingClusterRoleBinding

3️⃣ 元数据级

HPAPodTemplateLimitRange

kubernetes资源清单

⭐️在k8s中使用YAML文件格式来创建符合期望的pod,这样的yaml文件叫做资源清单

1️⃣ K8s中yaml常用字段

⭐️必填段

image-20240430003341832

⭐️主要段

image-20240430003407185

image-20240430003418273

image-20240430003427912

⭐️ 额外段

image-20240430003441722

3️⃣ 实际操作命令

⭐️ 获取api列表

[root@master ~]# kubectl api-versions
admissionregistration.k8s.io/v1beta1
apiextensions.k8s.io/v1beta1
apiregistration.k8s.io/v1
apiregistration.k8s.io/v1beta1
apps/v1
apps/v1beta1
apps/v1beta2
authentication.k8s.io/v1
authentication.k8s.io/v1beta1
authorization.k8s.io/v1
authorization.k8s.io/v1beta1
autoscaling/v1
autoscaling/v2beta1
autoscaling/v2beta2
batch/v1
batch/v1beta1
certificates.k8s.io/v1beta1
coordination.k8s.io/v1
coordination.k8s.io/v1beta1
events.k8s.io/v1beta1
extensions/v1beta1
networking.k8s.io/v1
networking.k8s.io/v1beta1
node.k8s.io/v1beta1
policy/v1beta1
rbac.authorization.k8s.io/v1
rbac.authorization.k8s.io/v1beta1
scheduling.k8s.io/v1
scheduling.k8s.io/v1beta1
storage.k8s.io/v1
storage.k8s.io/v1beta1
v1

获取版本信息(查看详细信息)

kubect explain -h

字段格式

apiversion <string>并表示子符串类型
metadata <bject>#表示需要嵌套多层字段
labels <map[string]string>#表示由k:v组成的映射
finalizers <[]string>#表示字串列表
ownerReferences < []0bject>#表示对象列表
hostPID <boolean>#布尔类型
priority <integer>#整型
name <string> -required-#如果类型后面接-required-, 表示为必填字段

image-20240430003604304

⭐️ 编写一个简单的pod文件模板

mkdir pod
vim pod/pod.yaml
apiVersion: v1
kind: Pod
metadata:name: websitenamespace: default ##这里不填也可以默认就是这个命名空间labels: ##定义标签app: webvsersion: v1
spec:containers:- name: web1image: nginx- name: web2image: nginx

创建pod

kubectl create -f pod/pod.yaml

查看pod

[root@master ~]# kubectl get pod
NAME                     READY   STATUS    RESTARTS   AGE
nginx-6b48575596-bsdt2   1/1     Running   1          24h
nginx-6b48575596-fbdjf   1/1     Running   1          24h
nginx-6b48575596-wzmdp   1/1     Running   1          24h
website                  1/2     Error     0          18s

⚠️ 可以看见是没起来的,为什么没起来呢?我们查看一下pod日志

kubectl describe pod website
Events:Type     Reason     Age                    From               Message----     ------     ----                   ----               -------Normal   Scheduled  5m27s                  default-scheduler  Successfully assigned default/website to node1Normal   Pulling    5m27s                  kubelet, node1     Pulling image "nginx"Normal   Pulled     5m21s                  kubelet, node1     Successfully pulled image "nginx"Normal   Created    5m21s                  kubelet, node1     Created container web1Normal   Started    5m21s                  kubelet, node1     Started container web1Normal   Pulling    4m17s (x4 over 5m21s)  kubelet, node1     Pulling image "nginx"Normal   Pulled     4m12s (x4 over 5m15s)  kubelet, node1     Successfully pulled image "nginx"Normal   Created    4m12s (x4 over 5m15s)  kubelet, node1     Created container web2Normal   Started    4m12s (x4 over 5m14s)  kubelet, node1     Started container web2Warning  BackOff    19s (x20 over 5m3s)    kubelet, node1     Back-off restarting failed container
##可以看见web2一直退出
[root@master ~]# kubectl log website web2
log is DEPRECATED and will be removed in a future version. Use logs instead.
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2021/08/17 07:48:28 [emerg] 1#1: bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/08/17 07:48:28 [emerg] 1#1: bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
2021/08/17 07:48:28 [notice] 1#1: try again to bind() after 500ms
2021/08/17 07:48:28 [emerg] 1#1: bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/08/17 07:48:28 [emerg] 1#1: bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
2021/08/17 07:48:28 [notice] 1#1: try again to bind() after 500ms
2021/08/17 07:48:28 [emerg] 1#1: bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/08/17 07:48:28 [emerg] 1#1: bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
2021/08/17 07:48:28 [notice] 1#1: try again to bind() after 500ms
2021/08/17 07:48:28 [emerg] 1#1: bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/08/17 07:48:28 [emerg] 1#1: bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
2021/08/17 07:48:28 [notice] 1#1: try again to bind() after 500ms
2021/08/17 07:48:28 [emerg] 1#1: bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
2021/08/17 07:48:28 [emerg] 1#1: bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
2021/08/17 07:48:28 [notice] 1#1: try again to bind() after 500ms
2021/08/17 07:48:28 [emerg] 1#1: still could not bind()
这里一直显示80被占用

这里我画了个图

image-20240430003759571

我们更改pod.yaml文件在删除web2和镜像就好了

vim pod/pod.yaml 
apiVersion: v1
kind: Pod
metadata:name: websitelabels:app: webvsersion: v1
spec:containers:- name: web1image: nginx

在创建一个pod

[root@master ~]# kubectl create -f pod/pod.yaml 
pod/website created
[root@master ~]# kubectl get pod
NAME                     READY   STATUS    RESTARTS   AGE
nginx-6b48575596-bsdt2   1/1     Running   1          24h
nginx-6b48575596-fbdjf   1/1     Running   1          24h
nginx-6b48575596-wzmdp   1/1     Running   1          24h
website                  1/1     Running   0          10s

未经允许禁止转载

http://www.yayakq.cn/news/516915/

相关文章:

  • 微网站开发流程图wordpress pcdotfan
  • 网站的推广费用东莞网络推广哪家好
  • 怎么给钓鱼网站做防红网站建设合同属于技术合同吗
  • 广州市用工备案在哪个网站做对网络营销的认识有哪些
  • 网站结构怎么做适合优化企业公司简介范文
  • 怎么做磁力网站如何做谷歌网站优化
  • 江西鄱阳专业做网站龙岩融胤网络科技有限公司
  • 网站推广的特点是什么做音乐网站是不是侵权
  • 网上购物网站深圳建设发展有限公司
  • 图床网站怎么做网络运维培训大概多少钱
  • 河南手机网站建设公司广西建设科技与建筑节能协会网站
  • 网站的登录弹窗怎么做系统重装后怎么装wordpress
  • wordpress打开要卡一下模板网站可以优化吗
  • 扬州集团网站建设苏州老字号企业官方的网站策划书
  • 上海华东民航机场建设公司网站帝国cms导航模板
  • 手机网站制作教程视频教程网站营销推广策划方案
  • 企业资质查询官方网站app运营方案策划
  • php网站开发计划中国建筑设计咨询有限公司
  • 有没有做网站的软件正规绍兴网站建设公司
  • 玫琳凯网站建设方案拉新注册app拿佣金
  • 对网站建设的考核机制商品关键词优化的方法
  • 个人网站上线流程公司的官方网站的作用
  • 做现货值得关注的财经网站扬州市市政建设处网站
  • 网站网页优化技巧中文购物网站模板
  • 网页建设多少钱seo页面优化公司
  • 网站后台页面设计去海南注册公司需要什么条件
  • 昌邑网站建设刚做的网站怎么收录
  • 做网站多大福州app开发制作
  • 北京网站建设seo工作室创业项目
  • 外贸网站的推广技巧有哪些wordpress插件吧