zoukankan      html  css  js  c++  java
  • kubectl explain IngressClass

    root@ubuntu:~/kubernetes-ingress/deployments/common# kubectl explain IngressClass
    KIND:     IngressClass
    VERSION:  networking.k8s.io/v1beta1
    
    DESCRIPTION:
         IngressClass represents the class of the Ingress, referenced by the Ingress
         Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be
         used to indicate that an IngressClass should be considered default. When a
         single IngressClass resource has this annotation set to true, new Ingress
         resources without a class specified will be assigned this default class.
    
    FIELDS:
       apiVersion   <string>
         APIVersion defines the versioned schema of this representation of an
         object. Servers should convert recognized schemas to the latest internal
         value, and may reject unrecognized values. More info:
         https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
    
       kind <string>
         Kind is a string value representing the REST resource this object
         represents. Servers may infer this from the endpoint the client submits
         requests to. Cannot be updated. In CamelCase. More info:
         https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    
       metadata     <Object>
         Standard object's metadata. More info:
         https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    
       spec <Object>
         Spec is the desired state of the IngressClass. More info:
         https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    
    root@ubuntu:~/kubernetes-ingress/deployments/common# kubectl explain IngressClass.spec
    KIND:     IngressClass
    VERSION:  networking.k8s.io/v1beta1
    
    RESOURCE: spec <Object>
    
    DESCRIPTION:
         Spec is the desired state of the IngressClass. More info:
         https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    
         IngressClassSpec provides information about the class of an Ingress.
    
    FIELDS:
       controller   <string>
         Controller refers to the name of the controller that should handle this
         class. This allows for different "flavors" that are controlled by the same
         controller. For example, you may have different Parameters for the same
         implementing controller. This should be specified as a domain-prefixed path
         no more than 250 characters in length, e.g. "acme.io/ingress-controller".
         This field is immutable.
    
       parameters   <Object>
         Parameters is a link to a custom resource containing additional
         configuration for the controller. This is optional if the controller does
         not require extra parameters.
    
    root@ubuntu:~/kubernetes-ingress/deployments/common# kubectl explain IngressClass.spec.controller
    KIND:     IngressClass
    VERSION:  networking.k8s.io/v1beta1
    
    FIELD:    controller <string>
    
    DESCRIPTION:
         Controller refers to the name of the controller that should handle this
         class. This allows for different "flavors" that are controlled by the same
         controller. For example, you may have different Parameters for the same
         implementing controller. This should be specified as a domain-prefixed path
         no more than 250 characters in length, e.g. "acme.io/ingress-controller".
         This field is immutable.
    root@ubuntu:~/kubernetes-ingress/deployments/common# kubectl create -f   ingress-k8s-class.yaml
    error: error validating "ingress-k8s-class.yaml": error validating data: ValidationError(IngressClass.spec): invalid type for io.k8s.api.networking.v1beta1.IngressClassSpec: got "string", expected "map"; if you choose to ignore these errors, turn validation off with --validate=false
    root@ubuntu:~/kubernetes-ingress/deployments/common# cat ingress-k8s-class.yaml
    apiVersion: networking.k8s.io/v1beta1
    kind: IngressClass
    metadata:
      name: nginx-k8s
      # annotations:
      #   ingressclass.kubernetes.io/is-default-class: "true"
    spec:
      controller:kubernetes.io/ingress-controller
    root@ubuntu:~/kubernetes-ingress/deployments/common# cat ingress-
    ingress-class.yaml      ingress-k8s-class.yaml  
    root@ubuntu:~/kubernetes-ingress/deployments/common# cat ingress-class.yaml 
    apiVersion: networking.k8s.io/v1beta1
    kind: IngressClass
    metadata:
      name: nginx-org
      # annotations:
      #   ingressclass.kubernetes.io/is-default-class: "true"
    spec:
      controller: nginx.org/ingress-controller
    root@ubuntu:~/kubernetes-ingress/deployments/common# kubectl get ingressclass
    NAME        CONTROLLER                         PARAMETERS   AGE
    nginx-k8s   kubernetes.io/ingress-controller   <none>       14s
    nginx-org   nginx.org/ingress-controller       <none>       4h30m
    root@ubuntu:~/kubernetes-ingress/deployments/common# 
  • 相关阅读:
    ASP.NET MVC案例——————拦截器
    Windows Azure Virtual Network (10) 使用Azure Access Control List(ACL)设置客户端访问权限
    Windows Azure Storage (20) 使用Azure File实现共享文件夹
    Windows Azure HandBook (5) Azure混合云解决方案
    Windows Azure Service Bus (6) 中继(Relay On) 使用VS2013开发Service Bus Relay On
    Azure PowerShell (9) 使用PowerShell导出订阅下所有的Azure VM的Public IP和Private IP
    Windows Azure Service Bus (5) 主题(Topic) 使用VS2013开发Service Bus Topic
    Azure China (9) 在Azure China配置CDN服务
    Windows Azure Storage (19) 再谈Azure Block Blob和Page Blob
    Windows Azure HandBook (4) 分析Windows Azure如何处理Session
  • 原文地址:https://www.cnblogs.com/dream397/p/15191203.html
Copyright © 2011-2022 走看看