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

大数据和网站开发施工企业组织机构框架图

大数据和网站开发,施工企业组织机构框架图,如何寻找做网站的客户,安徽做网站公司哪家好一.Yaml文件详解 1.Yaml文件格式 #xff08;1#xff09;Kubernetes 支持 YAML 和 JSON 格式管理资源对象 #xff08;2#xff09;JSON 格式#xff1a;主要用于 api 接口之间消息的传递 #xff08;3#xff09;YAML 格式#xff1a;用于配置和管理#xff0c;…一.Yaml文件详解 1.Yaml文件格式 1Kubernetes 支持 YAML 和 JSON 格式管理资源对象 2JSON 格式主要用于 api 接口之间消息的传递 3YAML 格式用于配置和管理YAML 是一种简洁的非标记性语言内容格式人性化较易读 2.YAML 语法格式 1大小写敏感 2使用缩进表示层级关系 3不支持Tab键制表符缩进只使用空格缩进 4缩进的空格数目不重要只要相同层级的元素左侧对齐即可通常开头缩进两个空格 5符号字符后缩进一个空格如冒号逗号短横杆-等 6“---”表示YAML格式一个文件的开始用于分隔文件间 7“#”表示注释 二.Yaml文件编写及相关概念 1.查看 api 资源版本标签 kubectl api-versions [rootk8s-master-136 ~]# kubectl api-versions admissionregistration.k8s.io/v1 admissionregistration.k8s.io/v1beta1 apiextensions.k8s.io/v1 apiextensions.k8s.io/v1beta1 apiregistration.k8s.io/v1 apiregistration.k8s.io/v1beta1 apps/v1 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/v1 certificates.k8s.io/v1beta1 coordination.k8s.io/v1 coordination.k8s.io/v1beta1 crd.projectcalico.org/v1 discovery.k8s.io/v1 discovery.k8s.io/v1beta1 events.k8s.io/v1 events.k8s.io/v1beta1 extensions/v1beta1 flowcontrol.apiserver.k8s.io/v1beta1 networking.k8s.io/v1 networking.k8s.io/v1beta1 node.k8s.io/v1 node.k8s.io/v1beta1 policy/v1 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 2.yaml编写案例 #查看deployment的版本定义 kubectl explain deployment [rootk8s-master-136 ~]# kubectl explain deployment KIND: Deployment VERSION: apps/v1DESCRIPTION:Deployment enables declarative updates for Pods and ReplicaSets.FIELDS:apiVersion stringAPIVersion defines the versioned schema of this representation of anobject. Servers should convert recognized schemas to the latest internalvalue, and may reject unrecognized values. More info:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resourceskind stringKind is a string value representing the REST resource this objectrepresents. Servers may infer this from the endpoint the client submitsrequests to. Cannot be updated. In CamelCase. More info:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kindsmetadata ObjectStandard object metadata.spec ObjectSpecification of the desired behavior of the Deployment.status ObjectMost recently observed status of the Deployment. #查看api的版本 kubectl explain deployment.apiVersion[rootk8s-master-136 ~]# kubectl explain deployment.apiVersion KIND: Deployment VERSION: apps/v1FIELD: apiVersion stringDESCRIPTION:APIVersion defines the versioned schema of this representation of anobject. Servers should convert recognized schemas to the latest internalvalue, and may reject unrecognized values. More info:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources #查看元数据信息 kubectl explain deployment.apiVersion #定义标签介绍 kubectl explain deployment.spec.selector[rootk8s-master-136 ~]# kubectl explain deployment.spec.selector KIND: Deployment VERSION: apps/v1RESOURCE: selector ObjectDESCRIPTION:Label selector for pods. Existing ReplicaSets whose pods are selected bythis will be the ones affected by this deployment. It must match the podtemplates labels.A label selector is a label query over a set of resources. The result ofmatchLabels and matchExpressions are ANDed. An empty label selector matchesall objects. A null label selector matches no objects.FIELDS:matchExpressions []ObjectmatchExpressions is a list of label selector requirements. The requirementsare ANDed.matchLabels map[string]stringmatchLabels is a map of {key,value} pairs. A single {key,value} in thematchLabels map is equivalent to an element of matchExpressions, whose keyfield is key, the operator is In, and the values array contains onlyvalue. The requirements are ANDed.#对matchLabels标签介绍 kubectl explain deployment.spec.selector.matchLabels[rootk8s-master-136 ~]# kubectl explain deployment.spec.selector.matchLabels KIND: Deployment VERSION: apps/v1FIELD: matchLabels map[string]stringDESCRIPTION:matchLabels is a map of {key,value} pairs. A single {key,value} in thematchLabels map is equivalent to an element of matchExpressions, whose keyfield is key, the operator is In, and the values array contains onlyvalue. The requirements are ANDed. Deployment类型编写nginx服务 创建pod vim nginx-deployment.yamlapiVersion: apps/v1 #指定api版本标签 kind: Deployment #定义资源的类型/角色deployment为副本控制器此处资源类型可以是Deployment、Job、Ingress、Service等 metadata: #定义资源的元数据信息比如资源的名称、namespace、标签等信息name: nginx-deployment #定义资源的名称在同一个namespace空间中必须是唯一的namespace default #默认就是default可以不用写labels: #定义Deployment资源标签app: nginx spec: #定义deployment资源需要的参数属性诸如是否在容器失败时重新启动容器的属性replicas: 3 #定义副本数量selector: #定义标签选择器matchLabels: #定义匹配标签app: nginx #需与 .spec.template.metadata.labels 定义的标签保持一致template: #定义业务模板如果有多个副本所有副本的属性会按照模板的相关配置进行匹配metadata:labels: #定义Pod副本将使用的标签需与 .spec.selector.matchLabels 定义的标签保持一致app: nginxspec:containers: #定义容器属性- name: nginx #定义一个容器名一个 - name: 定义一个容器image: nginx:1.15.4 #定义容器使用的镜像以及版本ports:- containerPort: 80 #定义容器的对外的端口 #创建资源对象 kubectl create -f nginx-deployment.yaml 或 kubectl apply -f nginx-deployment.yaml #查看创建的资源对象创建需等待running kubectl get pod 容器如果想对外提供访问需创建service 发布 #创建service服务对外提供访问并测试 vim nginx-service.yamlapiVersion: v1 kind: Service metadata:name: nginx-servicelabels:app: nginx spec:selector:app: nginxtype: NodePort ports:- port: 80targetPort: 80 #创建资源对象 kubectl create -f nginx-service.yaml 或 kubectl apply -f nginx-service.yaml #查看创建的service kubectl get svc k8s集群中的port介绍 详解k8s中的port ●port port 是 k8s 集群内部访问service的端口即通过 clusterIP: port 可以从 Pod 所在的 Node 上访问到 service ●nodePort nodePort 是外部访问 k8s 集群中 service 的端口通过 nodeIP: nodePort 可以从外部访问到某个 service。 ●targetPort targetPort 是 Pod 的端口从 port 或 nodePort 来的流量经过 kube-proxy 反向代理负载均衡转发到后端 Pod 的 targetPort 上最后进入容器。 ●containerPort containerPort 是 Pod 内部容器的端口targetPort 映射到 containerPort。
http://www.pierceye.com/news/255991/

相关文章:

  • 商城网站开发需要哪些人员本机建的网站打开却很慢
  • 网站建设哪专业学会python做网站
  • vs怎么添加图片做网站地方门户网站管理系统
  • 三亚做网站的公司科技网站推荐
  • 电商网站运维怎么做自己做网站创业
  • seo有哪些网站集团公司网站 案例
  • 传媒大学附近网站建设公司天津市工程建设公众信息网官网
  • 关于网站建设与维护的参考文献家装设计费用多少钱一平方
  • 网站建设与管理专业概述网站建设报价费用是多少
  • asp医院网站源码破解版北京企业做网站报价
  • 个人做电商网站赚钱吗门业网站模板
  • 企业产品微网站收费吗wordpress移服务器改域名
  • 原创文章网站网站建设团队介绍
  • WordPress建站详细过程安康建设网站
  • 仿视频网站开发wordpress下载文件
  • 专业的个人网站建设哪家建筑施工企业专职安全生产管理员
  • 企业网站模板php全球网站排名前100
  • 1688网站可以做全屏吗有哪些网站是织梦做的
  • vue2.0网站开发做网站没有成本的方法
  • 手机网站和app有什么区别流量对网站排名的影响因素
  • 北京全网营销推广公司网站建设以及seo
  • 免费html网站代码骨科医院网站模板
  • 华强方特网站开发辽宁工程技术大学电子信息网
  • 信誉好的网站建设案例微网站后台录入
  • 网站ui界面设计模板WordPress能连接支付端口吗
  • 网站建设与维护ppt模板下载昆明 网站搭建
  • 手机网站建设浩森宇特摄影作品投稿平台
  • 网站类网站开发犯罪吗肇东网站建设云聚达
  • 云南通耀建设工程有限公司网站少儿编程老师需要具备什么条件
  • 陕西交通建设集团蓝商分公司网站wordpress增加模板