kubernetes的Ingress资源介绍
Ingress 的资源帮助信息介绍
[root@master ~]# kubectl explain ingress
KIND: Ingress
VERSION: extensions/v1beta1 DESCRIPTION:
Ingress is a collection of rules that allow inbound connections to reach
the endpoints defined by a backend. An Ingress can be configured to give
services externally-reachable urls, load balance traffic, terminate SSL,
offer name based virtual hosting etc. DEPRECATED - This group version of
Ingress is deprecated by networking.k8s.io/v1beta1 Ingress. See the release
notes for more information. 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/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/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 Ingress. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status status <Object>
Status is the current state of the Ingress. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
查看期望状态的帮助信息
[root@master ~]# kubectl explain ingress.spec
KIND: Ingress
VERSION: extensions/v1beta1 RESOURCE: spec <Object> DESCRIPTION:
Spec is the desired state of the Ingress. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status IngressSpec describes the Ingress the user wishes to exist. FIELDS:
backend <Object> 后端的pod
A default backend capable of servicing requests that don't match any rule.
At least one of 'backend' or 'rules' must be specified. This field is
optional to allow the loadbalancer controller or defaulting logic to
specify a global default. rules <[]Object> 规则
A list of host rules used to configure the Ingress. If unspecified, or no
rule matches, all traffic is sent to the default backend. tls <[]Object>
TLS configuration. Currently the Ingress only supports a single TLS port,
443. If multiple members of this list specify different hosts, they will be
multiplexed on the same port according to the hostname specified through
the SNI TLS extension, if the ingress controller fulfilling the ingress
supports SNI.
调度的规则
[root@master ~]# kubectl explain ingress.spec.rules
KIND: Ingress
VERSION: extensions/v1beta1 RESOURCE: rules <[]Object> DESCRIPTION:
A list of host rules used to configure the Ingress. If unspecified, or no
rule matches, all traffic is sent to the default backend. IngressRule represents the rules mapping the paths under a specified host
to the related backend services. Incoming requests are first evaluated for
a host match, then routed to the backend associated with the matching
IngressRuleValue. FIELDS:
host <string> 主机名
Host is the fully qualified domain name of a network host, as defined by
RFC 3986. Note the following deviations from the "host" part of the URI as
defined in the RFC: 1. IPs are not allowed. Currently an IngressRuleValue
can only apply to the IP in the Spec of the parent Ingress. 2. The `:`
delimiter is not respected because ports are not allowed. Currently the
port of an Ingress is implicitly :80 for http and :443 for https. Both
these may change in the future. Incoming requests are matched against the
host before the IngressRuleValue. If the host is unspecified, the Ingress
routes all traffic based on the specified IngressRuleValue. http <Object> url
基于主机名匹配
[root@master ~]# kubectl explain ingress.spec.rules.host
KIND: Ingress
VERSION: extensions/v1beta1 FIELD: host <string> DESCRIPTION:
Host is the fully qualified domain name of a network host, as defined by
RFC 3986. Note the following deviations from the "host" part of the URI as
defined in the RFC: 1. IPs are not allowed. Currently an IngressRuleValue
can only apply to the IP in the Spec of the parent Ingress. 2. The `:`
delimiter is not respected because ports are not allowed. Currently the
port of an Ingress is implicitly :80 for http and :443 for https. Both
these may change in the future. Incoming requests are matched against the
host before the IngressRuleValue. If the host is unspecified, the Ingress
routes all traffic based on the specified IngressRuleValue.
url匹配
[root@master ~]# kubectl explain ingress.spec.rules.http
KIND: Ingress
VERSION: extensions/v1beta1 RESOURCE: http <Object> DESCRIPTION: HTTPIngressRuleValue is a list of http selectors pointing to backends. In
the example: http://<host>/<path>?<searchpart> -> backend where where parts
of the url correspond to RFC 3986, this resource will be used to match
against everything after the last '/' and before the first '?' or '#'. FIELDS:
paths <[]Object> -required-
A collection of paths that map requests to backends.
后端pod的帮助信息
KIND: Ingress
VERSION: extensions/v1beta1 RESOURCE: backend <Object> DESCRIPTION:
A default backend capable of servicing requests that don't match any rule.
At least one of 'backend' or 'rules' must be specified. This field is
optional to allow the loadbalancer controller or defaulting logic to
specify a global default. IngressBackend describes all endpoints for a given service and port. FIELDS:
serviceName <string> -required- 后端server的名字的定义
Specifies the name of the referenced service. servicePort <string> -required- 端口
Specifies the port of the referenced service.
kubernetes的Ingress资源介绍的更多相关文章
- Kubernetes的service资源介绍
service 三种工作模式:userspace.iptables.ipvs 删除手动创建的service [root@master ~]# kubectl delete svc redis serv ...
- Kubernetes 使用 ingress 配置 https 集群(十五)
目录 一.背景 1.1 需求 1.2 Ingress 1.3 环境介绍 二.安装部署 2.1.创建后端 Pod 应用 2.2 创建后端 Pod Service 2.3.创建 ingress 资源 2. ...
- Kubernetes:Ingress总结(一)
Blog:博客园 个人 参考:Ingress | Kubernetes.<Kubernetes进阶实战>.<Kubernetes网络权威指南 > 何谓Ingress?从字面意思 ...
- (八)Kubernetes Ingress资源
前言 Kubernetes提供了两种内建的云端负载均衡机制(cloud load balancing)用于发布公共应用,一种是工作于传输层的Service资源,它实现的是“TCP负载均衡器”,另一种是 ...
- 【转】Kubernetes的Ingress控制器比较
Kubernetes的Ingress控制器比较 fiisio Kubernetes/云计算/资源调度/Go语言 21 人赞同了该文章 翻译:https://medium.com/flant-com/c ...
- 干货分享:如何使用Kubernetes的Ingress API
您可以通过使用诸如Kong for Kubernetes的Ingress控制器(使用自定义资源定义并提供许多插件)来极大地扩展Ingress资源的功能. Kubernetes正在整个技术行业中得到采用 ...
- Kubernetes之Ingress
在Service篇里面介绍了像集群外部的客户端公开服务的两种方法,还有另一种方法---创建Ingress资源. 定义Ingress (名词)-进入或进入的行为;进入的权利;进入的手段或地点;入口. 接 ...
- kubernetes nginx ingress 使用记录
前言 ingress是一种可以暴露k8s集群内部service的方式,用户编辑配置文件定义一个ingress资源即可实现外部网络访问内网service. ingress controller是来管理所 ...
- Kubernetes系列之Helm介绍篇
本次系列使用的所需部署包版本都使用的目前最新的或最新稳定版,安装包地址请到公众号内回复[K8s实战]获取 介绍 Helm 是 Deis 开发的一个用于 Kubernetes 应用的包管理工具,主要用来 ...
随机推荐
- L2-3 名人堂与代金券
题解 这题的话,每一个人都要占一个排名,即使排名并列了. 对于最后一个排名来说,即使人数超过了指定的k,也要加入. 代码 #include <bits/stdc++.h> using na ...
- wamp配置本地多站点。
' 进入C:\wamp64\wamp64\bin\apache\apache2.4.37\conf\http.conf 首先确保httpd-vhosts.conf扩展文件引入进来了,部分版本默认是不引 ...
- bzoj4199: [Noi2015]品酒大会 (并查集 && 后缀数组)
据说用后缀自动机 + dp也能做 然而并不会 后缀数组的做法呢 就是先建个后缀数组,求出height值,此时如果直接找,复杂度是n ^ 2的,肯定会超时. 但是height大的值是不会对小的产生影响的 ...
- 【PAT甲级】1113 Integer Set Partition (25分)
题意: 输入一个正整数N(2<=N<=1e5),接着输入N个正整数,将这些数字划分为两个不相交的集合,使得他们的元素个数差绝对值最小且元素和差绝对值最大. AAAAAccepted cod ...
- SpringBoot获取http请求参数的方法
SpringBoot获取http请求参数的方法 原文:https://www.cnblogs.com/zhanglijun/p/9403483.html 有七种Java后台获取前端传来参数的方法,稍微 ...
- 每天进步一点点------Allegro 布线完成后如何修改线宽
一.如果要改变整个一条导线的宽度 1.在find栏里选择Cline; 2.在PCB中选择要改的导线,点击右键,选择Change Width 3.在对话框中输入你想要的线宽 3.如果要改变整个导线 ...
- jenkins新建任务详解
一.新建任务 点击左侧新建任务 输入任务名称-->选择构建一个自由风格的软件项目-->确认 进入任务配置页面 二.基本配置 General 配置构建保留天数,保留个数,必要时并发构建 源码 ...
- command failed: npm install --loglevel error --registry=https://registry.npm 用vue-cli 4.0 新建项目总是报错
昨天新买的本本,今天布环境,一安装vue-cli发现都4.0+的版本了,没管太多,就开始新建个项目感受哈,一切运行顺利,输入 "vue create app" 的时候,一切貌似进展 ...
- H5实现查看图片和删除图片的效果
在最近的项目中,H5需要实现查看图片和删除图片的效果,总结如下: 一.查看图片 查看图片使用weui的gallery.首先添加gallery的html,然后隐藏. <div class=&quo ...
- 主库增加表空间导致DG同步失败
由于主库表空间不足,同事给表空间增加数据文件,第二天收到反馈说备库未同步. 1.主.备查看归档序列号,发现主.备归档正常同步. SQL>archive log list 2.在主库端查询v$ar ...