forked from docs/doc-exports
Reviewed-by: Eotvos, Oliver <oliver.eotvos@t-systems.com> Co-authored-by: qiujiandong1 <qiujiandong1@huawei.com> Co-committed-by: qiujiandong1 <qiujiandong1@huawei.com>
243 lines
22 KiB
HTML
243 lines
22 KiB
HTML
<a name="cce_10_0940"></a><a name="cce_10_0940"></a>
|
|
|
|
<h1 class="topictitle1">Configuring Advanced Forwarding Rules for a LoadBalancer Ingress</h1>
|
|
<div id="body0000002078490189"><p id="cce_10_0940__p8987191013197">Ingresses offer diverse forwarding rules that can match listeners based on different request parameters like HTTP request methods, headers, query strings, CIDR blocks, and cookies. Each listener is associated with an ELB access port. This facilitates flexible service distribution and resource allocation.</p>
|
|
<div class="fignone" id="cce_10_0940__fig124918436920"><span class="figcap"><b>Figure 1 </b>How an advanced forwarding rule operates</span><br><span><img class="eddx" id="cce_10_0940__image54918432095" src="en-us_image_0000002253779921.png"></span></div>
|
|
<div class="section" id="cce_10_0940__section1217816043419"><h4 class="sectiontitle">Prerequisites</h4><ul id="cce_10_0940__ul11453637191613"><li id="cce_10_0940__li1193592633115">A CCE standard or Turbo cluster is available, and the cluster version meets the following requirements:<ul id="cce_10_0940__ul62201752154212"><li id="cce_10_0940__li1434132714436">v1.23: v1.23.18-r10 or later</li><li id="cce_10_0940__li1043452711434">v1.25: v1.25.16-r0 or later</li><li id="cce_10_0940__li18434427114315">v1.27: v1.27.16-r0 or later</li><li id="cce_10_0940__li5434162717437">v1.28: v1.28.13-r0 or later</li><li id="cce_10_0940__li10434827154315">v1.29: v1.29.8-r0 or later</li><li id="cce_10_0940__li19434327194310">v1.30: v1.30.4-r0 or later</li><li id="cce_10_0940__li194601627112417">Other clusters of later versions</li></ul>
|
|
</li><li id="cce_10_0940__li2045311379169">The cluster can be accessed using kubectl. For details, see <a href="cce_10_0107.html">Accessing a Cluster Using kubectl</a>.</li></ul>
|
|
</div>
|
|
<div class="section" id="cce_10_0940__section129061918202215"><h4 class="sectiontitle">Notes and Constraints</h4><ul id="cce_10_0940__ul20906151813222"><li id="cce_10_0940__cce_10_0690_li12403122232210">This feature is only available when dedicated load balancers are used.</li></ul>
|
|
</div>
|
|
<div class="section" id="cce_10_0940__section776311276199"><h4 class="sectiontitle">Using kubectl</h4><ol id="cce_10_0940__ol18588159121215"><li id="cce_10_0940__li5499103219119"><span>Use kubectl to access the cluster. For details, see <a href="cce_10_0107.html">Accessing a Cluster Using kubectl</a>.</span></li><li id="cce_10_0940__li128720461410"><span>Create a YAML file named <strong id="cce_10_0940__b098511536433">ingress-test.yaml</strong>. The file name can be customized.</span><p><pre class="screen" id="cce_10_0940__screen146351106288">vi ingress-test.yaml</pre>
|
|
<div class="p" id="cce_10_0940__p2165188113219">An example YAML file of an ingress created using an existing load balancer is as follows:<pre class="screen" id="cce_10_0940__screen0555174710241">apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
annotations:
|
|
kubernetes.io/elb.class: performance
|
|
kubernetes.io/elb.id: <i><span class="varname" id="cce_10_0940__varname1632893081218">ab53c3b2-xxxx-xxxx-xxxx-5ac3eb2887be</span></i>
|
|
kubernetes.io/elb.port: <i><span class="varname" id="cce_10_0940__varname468133415123">'80'</span></i>
|
|
# Access the <strong id="cce_10_0940__b28309918207">svc-hello1</strong> service. Ensure that this service is available.
|
|
<strong id="cce_10_0940__b1141825912318"> kubernetes.io/elb.conditions.<i><span class="varname" id="cce_10_0940__varname19731151420">svc-hello1</span></i>: | </strong>
|
|
<strong id="cce_10_0940__b2048862615310"> [ </strong>
|
|
<strong id="cce_10_0940__b19489926433"> { </strong>
|
|
<strong id="cce_10_0940__b44901326336"> "type": "Method", </strong>
|
|
<strong id="cce_10_0940__b16491142619316"> "methodConfig": { </strong>
|
|
<strong id="cce_10_0940__b449118261313"> "values": [ </strong>
|
|
<strong id="cce_10_0940__b114921261134"> "GET", </strong>
|
|
<strong id="cce_10_0940__b849211262035"> "POST" </strong>
|
|
<strong id="cce_10_0940__b174930265317"> ] </strong>
|
|
<strong id="cce_10_0940__b149317261936"> } </strong>
|
|
<strong id="cce_10_0940__b14494152616319"> }, </strong>
|
|
<strong id="cce_10_0940__b6494162612313"> { </strong>
|
|
<strong id="cce_10_0940__b134951926437"> "type": "Header", </strong>
|
|
<strong id="cce_10_0940__b44951126131"> "headerConfig": { </strong>
|
|
<strong id="cce_10_0940__b164969261933"> "key": "gray-hello", </strong>
|
|
<strong id="cce_10_0940__b164961526233"> "values": [ </strong>
|
|
<strong id="cce_10_0940__b149715261437"> "value1", </strong>
|
|
<strong id="cce_10_0940__b64977261537"> "value2" </strong>
|
|
<strong id="cce_10_0940__b10497202613318"> ] </strong>
|
|
<strong id="cce_10_0940__b1149815261133"> } </strong>
|
|
<strong id="cce_10_0940__b84986268311"> }, </strong>
|
|
<strong id="cce_10_0940__b124991226537"> { </strong>
|
|
<strong id="cce_10_0940__b650217261737"> "type": "Cookie", </strong>
|
|
<strong id="cce_10_0940__b1550282613319"> "cookieConfig": { </strong>
|
|
<strong id="cce_10_0940__b15502102618316"> "values": [ </strong>
|
|
<strong id="cce_10_0940__b55034261233"> { </strong>
|
|
<strong id="cce_10_0940__b1850315261134"> "key": "querystringkey1", </strong>
|
|
<strong id="cce_10_0940__b10504112614317"> "value": "querystringvalue2" </strong>
|
|
<strong id="cce_10_0940__b55042264319"> }, </strong>
|
|
<strong id="cce_10_0940__b6504526335"> { </strong>
|
|
<strong id="cce_10_0940__b195051726332"> "key": "querystringkey3", </strong>
|
|
<strong id="cce_10_0940__b16505226238"> "value": "querystringvalue4" </strong>
|
|
<strong id="cce_10_0940__b450611261319"> } </strong>
|
|
<strong id="cce_10_0940__b950620267315"> ] </strong>
|
|
<strong id="cce_10_0940__b350619264310"> } </strong>
|
|
<strong id="cce_10_0940__b19507726735"> }, </strong>
|
|
<strong id="cce_10_0940__b2508192617315"> { </strong>
|
|
<strong id="cce_10_0940__b19508172620311"> "type": "QueryString", </strong>
|
|
<strong id="cce_10_0940__b155091226132"> "queryStringConfig": { </strong>
|
|
<strong id="cce_10_0940__b20509142617314"> "key": "testKey", </strong>
|
|
<strong id="cce_10_0940__b8510172611316"> "values": [ </strong>
|
|
<strong id="cce_10_0940__b10510326635"> "testValue" </strong>
|
|
<strong id="cce_10_0940__b251117261312"> ] </strong>
|
|
<strong id="cce_10_0940__b125110263316"> } </strong>
|
|
<strong id="cce_10_0940__b8512426637"> }, </strong>
|
|
<strong id="cce_10_0940__b105128261316"> { </strong>
|
|
<strong id="cce_10_0940__b145131626330"> "type": "SourceIp", </strong>
|
|
<strong id="cce_10_0940__b105131826934"> "sourceIpConfig": { </strong>
|
|
<strong id="cce_10_0940__b1151411263317"> "values": [ </strong>
|
|
<strong id="cce_10_0940__b145141626337"> "192.168.0.0/16", </strong>
|
|
<strong id="cce_10_0940__b11514226231"> "172.16.0.0/16" </strong>
|
|
<strong id="cce_10_0940__b9515192620319"> ] </strong>
|
|
<strong id="cce_10_0940__b19515726130"> } </strong>
|
|
<strong id="cce_10_0940__b205169261032"> } </strong>
|
|
<strong id="cce_10_0940__b5516192616310"> ] </strong>
|
|
name: ingress-test
|
|
spec:
|
|
ingressClassName: cce
|
|
rules:
|
|
- http:
|
|
paths:
|
|
- path: /hello1
|
|
pathType: ImplementationSpecific
|
|
backend:
|
|
service:
|
|
name: svc-hello1
|
|
port:
|
|
number: 80</pre>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="cce_10_0940__table849411591571" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Annotations for advanced forwarding rules</caption><thead align="left"><tr id="cce_10_0940__row12227190135"><th align="left" class="cellrowborder" valign="top" width="28.57%" id="mcps1.3.5.2.2.2.3.2.4.1.1"><p id="cce_10_0940__p1312062011136">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="14.29%" id="mcps1.3.5.2.2.2.3.2.4.1.2"><p id="cce_10_0940__p15121182018133">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="57.14%" id="mcps1.3.5.2.2.2.3.2.4.1.3"><p id="cce_10_0940__p141211920131317">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="cce_10_0940__row5494859572"><td class="cellrowborder" valign="top" width="28.57%" headers="mcps1.3.5.2.2.2.3.2.4.1.1 "><p id="cce_10_0940__p1139244872818">kubernetes.io/elb.conditions.<em id="cce_10_0940__i8392104822813">${svc_name}</em></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.29%" headers="mcps1.3.5.2.2.2.3.2.4.1.2 "><p id="cce_10_0940__p9392124882819">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="57.14%" headers="mcps1.3.5.2.2.2.3.2.4.1.3 "><p id="cce_10_0940__p11486172123517">Configure an advanced forwarding rule. <i><span class="varname" id="cce_10_0940__varname178381761211">${svc_name}</span></i> indicates the Service name, which can contain a maximum of 48 characters.</p>
|
|
<p id="cce_10_0940__p1139211487284">If the annotation value is set to <i><span class="varname" id="cce_10_0940__varname332618910343">[]</span></i>, the advanced forwarding rule is deleted.</p>
|
|
<p id="cce_10_0940__p346818911911">An annotation value is in the form of a JSON array. For details, see <a href="#cce_10_0940__table18956183913383">Table 2</a>.</p>
|
|
<div class="notice" id="cce_10_0940__note191201347718"><span class="noticetitle"> NOTICE: </span><div class="noticebody"><p id="cce_10_0940__p1315041216257">The rules in a condition array are connected by an AND relationship, while the values in the same rule block are connected by an OR relationship. For example, if both Method and QueryString are configured, the target traffic can be distributed only when both rules are met. However, if the Method value is GET or POST, the target traffic can be distributed only when both rules are met and the Method value must be GET or POST.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="cce_10_0940__table18956183913383"></a><a name="table18956183913383"></a><table cellpadding="4" cellspacing="0" summary="" id="cce_10_0940__table18956183913383" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Array structure</caption><thead align="left"><tr id="cce_10_0940__row179911407387"><th align="left" class="cellrowborder" valign="top" width="19.74197419741974%" id="mcps1.3.5.2.2.2.4.2.4.1.1"><p id="cce_10_0940__p104205348718">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="45.33453345334533%" id="mcps1.3.5.2.2.2.4.2.4.1.2"><p id="cce_10_0940__p29954016388">How to Use</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="34.92349234923493%" id="mcps1.3.5.2.2.2.4.2.4.1.3"><p id="cce_10_0940__p49913407388">Example</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="cce_10_0940__row116816405712"><td class="cellrowborder" valign="top" width="19.74197419741974%" headers="mcps1.3.5.2.2.2.4.2.4.1.1 "><p id="cce_10_0940__p76815401774">type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.33453345334533%" headers="mcps1.3.5.2.2.2.4.2.4.1.2 "><p id="cce_10_0940__p14989953173016">Matching type. Options:</p>
|
|
<ul id="cce_10_0940__ul370014811309"><li id="cce_10_0940__li113248550307"><strong id="cce_10_0940__b41402951412">Method</strong>: HTTP requests are forwarded based on the matched method. This parameter must be used with <strong id="cce_10_0940__b5666135512164">methodConfig</strong>. This parameter can be configured only once.</li><li id="cce_10_0940__li1700174863015"><strong id="cce_10_0940__b106081647113319">Header</strong>: HTTP requests are forwarded based on the matched header. This parameter must be used with <strong id="cce_10_0940__b14608164717336">headerConfig</strong>.</li><li id="cce_10_0940__li070094813305"><strong id="cce_10_0940__b6850114063911">Cookie</strong>: HTTP requests are forwarded based on the matched cookie. This parameter must be used with <strong id="cce_10_0940__b14850440183914">cookieConfig</strong>.</li><li id="cce_10_0940__li197001948133020"><strong id="cce_10_0940__b2791113914404">QueryString</strong>: HTTP requests are forwarded based on the matched character string. This parameter must be used with <strong id="cce_10_0940__b796412794615">queryStringConfig</strong>.</li><li id="cce_10_0940__li270011481305"><strong id="cce_10_0940__b159301916184611">SourceIp</strong>: HTTP requests are forwarded based on the matched CIDR block. This parameter must be used with <strong id="cce_10_0940__b193041618466">sourceIpConfig</strong>. This parameter can be configured only once.</li></ul>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.92349234923493%" headers="mcps1.3.5.2.2.2.4.2.4.1.3 "><p id="cce_10_0940__p129314185304">None</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="cce_10_0940__row5991040193812"><td class="cellrowborder" valign="top" width="19.74197419741974%" headers="mcps1.3.5.2.2.2.4.2.4.1.1 "><p id="cce_10_0940__p44206347716">methodConfig</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.33453345334533%" headers="mcps1.3.5.2.2.2.4.2.4.1.2 "><p id="cce_10_0940__p899194012384">An HTTP request method that is used to forward requests. This parameter is used only when <strong id="cce_10_0940__b1576720317489">type</strong> is set to <strong id="cce_10_0940__b030215124816">Method</strong>.</p>
|
|
<p id="cce_10_0940__p129914033819">Multiple request methods can be concurrently configured, including <strong id="cce_10_0940__b15751049132">GET</strong>, <strong id="cce_10_0940__b154905501438">POST</strong>, <strong id="cce_10_0940__b43416527314">PUT</strong>, <strong id="cce_10_0940__b1738011541637">DELETE</strong>, <strong id="cce_10_0940__b188626557319">PATCH</strong>, <strong id="cce_10_0940__b3457175720317">HEAD</strong>, and <strong id="cce_10_0940__b10948146435">OPTIONS</strong>.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.92349234923493%" headers="mcps1.3.5.2.2.2.4.2.4.1.3 "><p id="cce_10_0940__p1994781113713">You only need to configure values (an array) for <strong id="cce_10_0940__b688273615410">methodConfig</strong>.</p>
|
|
<pre class="screen" id="cce_10_0940__screen9201514183020">{
|
|
"type": "Method",
|
|
"methodConfig": {
|
|
"values": [
|
|
"GET",
|
|
"POST"
|
|
]
|
|
}
|
|
}</pre>
|
|
</td>
|
|
</tr>
|
|
<tr id="cce_10_0940__row12994400388"><td class="cellrowborder" valign="top" width="19.74197419741974%" headers="mcps1.3.5.2.2.2.4.2.4.1.1 "><p id="cce_10_0940__p12420934275">headerConfig</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.33453345334533%" headers="mcps1.3.5.2.2.2.4.2.4.1.2 "><p id="cce_10_0940__p6998405385">An HTTP request header that is used to forward requests. This parameter is used only when <strong id="cce_10_0940__b883167656">type</strong> is set to <strong id="cce_10_0940__b183271556">Header</strong>.</p>
|
|
<ul id="cce_10_0940__ul159223528343"><li id="cce_10_0940__li5922125214348">A key can only contain letters, digits, underscores (_), and hyphens (-).<p id="cce_10_0940__p29914011383"><a name="cce_10_0940__li5922125214348"></a><a name="li5922125214348"></a>The first letter of the <strong id="cce_10_0940__b558894662313">User-agent</strong> and <strong id="cce_10_0940__b1731154915234">Connection</strong> HTTP request headers must be capitalized.</p>
|
|
</li><li id="cce_10_0940__li15859288352">Multiple values can be configured for a key. A value can only contain letters, digits, and special characters (!#$%&'()*+,.\/:;<=>?@[]^-_'{|}~). Asterisks (*) and question marks (?) can be used as wildcard characters.</li></ul>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.92349234923493%" headers="mcps1.3.5.2.2.2.4.2.4.1.3 "><p id="cce_10_0940__p1899134013384">You can only configure one key for each <strong id="cce_10_0940__b165541139182718">headerConfig</strong> rule. If you need multiple keys, configure multiple <strong id="cce_10_0940__b15282716193019">headerConfig</strong> rules.</p>
|
|
<pre class="screen" id="cce_10_0940__screen11771205618127">{
|
|
"type": "Header",
|
|
"headerConfig": {
|
|
"key": "gray-hello",
|
|
"values": [
|
|
"value1",
|
|
"value2"
|
|
]
|
|
}
|
|
}</pre>
|
|
</td>
|
|
</tr>
|
|
<tr id="cce_10_0940__row139924016387"><td class="cellrowborder" valign="top" width="19.74197419741974%" headers="mcps1.3.5.2.2.2.4.2.4.1.1 "><p id="cce_10_0940__p44201934876">cookieConfig</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.33453345334533%" headers="mcps1.3.5.2.2.2.4.2.4.1.2 "><p id="cce_10_0940__p119984014388">A cookie that is used to forward requests. This parameter is used only when <strong id="cce_10_0940__b64209211072">type</strong> is set to <strong id="cce_10_0940__b204211321972">Cookie</strong>. A cookie consists of a key and a value, which must be configured separately.</p>
|
|
<ul id="cce_10_0940__ul123613358367"><li id="cce_10_0940__li5361235133617">A key can contain 1 to 100 characters and cannot start or end with a space.</li><li id="cce_10_0940__li436193510367">A value can contain 1 to 100 characters. Configure a value for each key.</li></ul>
|
|
<p id="cce_10_0940__p899114019383">You can enter multiple key-value pairs that can contain letters, digits, and special characters (!%'"()*+,./:=?@^-_`~).</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.92349234923493%" headers="mcps1.3.5.2.2.2.4.2.4.1.3 "><p id="cce_10_0940__p1110024015385">When configuring <strong id="cce_10_0940__b554510154384">cookieConfig</strong>, you can configure multiple key-value pairs in <strong id="cce_10_0940__b17421011193911">values</strong>, and these pairs will have an OR relationship with each other.</p>
|
|
<pre class="screen" id="cce_10_0940__screen131121375149">{
|
|
"type": "Cookie",
|
|
"cookieConfig": {
|
|
"values": [
|
|
{
|
|
"key": "querystringkey1",
|
|
"value": "querystringvalue2"
|
|
},
|
|
{
|
|
"key": "querystringkey3",
|
|
"value": "querystringvalue4"
|
|
}
|
|
]
|
|
}
|
|
}</pre>
|
|
</td>
|
|
</tr>
|
|
<tr id="cce_10_0940__row6100154013388"><td class="cellrowborder" valign="top" width="19.74197419741974%" headers="mcps1.3.5.2.2.2.4.2.4.1.1 "><p id="cce_10_0940__p144208341672">queryStringConfig</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.33453345334533%" headers="mcps1.3.5.2.2.2.4.2.4.1.2 "><p id="cce_10_0940__p71001740153812">A character string that is used to forward requests. If the character string in a request matches the one in the configured forwarding rule, the request will be forwarded. This parameter is used only when <strong id="cce_10_0940__b8466185064319">type</strong> is set to <strong id="cce_10_0940__b1672185317432">QueryString</strong>.</p>
|
|
<p id="cce_10_0940__p0813185373516">A query string consists of a key and one or more values. Configure the key and values separately.</p>
|
|
<ul id="cce_10_0940__ul18813105323510"><li id="cce_10_0940__li148131553203516">A key can only contain letters, digits, and special characters (!$'()*+,./:;=?@^-_').</li><li id="cce_10_0940__li1381335315356">Multiple values can be configured for a key. A value can only contain letters, digits, and special characters (!$'()*+,./:;=?@^-_'). Asterisks (*) and question marks (?) can be used as wildcard characters.</li></ul>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.92349234923493%" headers="mcps1.3.5.2.2.2.4.2.4.1.3 "><p id="cce_10_0940__p1410024083819">You can only configure one key for each <strong id="cce_10_0940__b270590105011">queryStringConfig</strong> rule. If you need multiple keys, configure multiple <strong id="cce_10_0940__b47058025015">QueryStringConfig</strong> rules.</p>
|
|
<pre class="screen" id="cce_10_0940__screen1533572171614">{
|
|
"type": "QueryString",
|
|
"queryStringConfig": {
|
|
"key": "testKey",
|
|
"values": [
|
|
"testValue"
|
|
]
|
|
}
|
|
}</pre>
|
|
</td>
|
|
</tr>
|
|
<tr id="cce_10_0940__row151001140113815"><td class="cellrowborder" valign="top" width="19.74197419741974%" headers="mcps1.3.5.2.2.2.4.2.4.1.1 "><p id="cce_10_0940__p1142013341075">sourceIpConfig</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.33453345334533%" headers="mcps1.3.5.2.2.2.4.2.4.1.2 "><p id="cce_10_0940__p201001403383">A CIDR block that is used to forward requests. This parameter is used only when <strong id="cce_10_0940__b9942516720">type</strong> is set to <strong id="cce_10_0940__b99414511271">SourceIp</strong>.</p>
|
|
<p id="cce_10_0940__p1910013403381">Example CIDR block: 192.168.1.0/24 or 2020:50::44/127</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="34.92349234923493%" headers="mcps1.3.5.2.2.2.4.2.4.1.3 "><p id="cce_10_0940__p310004023818">You only need to configure values (an array) for <strong id="cce_10_0940__b1835711559713">sourceIpConfig</strong>.</p>
|
|
<pre class="screen" id="cce_10_0940__screen1549718131715">{
|
|
"type": "SourceIp",
|
|
"sourceIpConfig": {
|
|
"values": [
|
|
"192.168.0.0/16",
|
|
"172.16.0.0/16"
|
|
]
|
|
}
|
|
}</pre>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</p></li><li id="cce_10_0940__li433915541090"><span>Create an ingress.</span><p><pre class="screen" id="cce_10_0940__screen7530152162919">kubectl create -f ingress-test.yaml</pre>
|
|
<p id="cce_10_0940__p5420131416240">If information similar to the following is displayed, the ingress has been created:</p>
|
|
<pre class="screen" id="cce_10_0940__screen1742018145243">ingress/ingress-test created</pre>
|
|
</p></li><li id="cce_10_0940__li643215588915"><span>Check the created ingress.</span><p><pre class="screen" id="cce_10_0940__screen117628192920">kubectl get ingress</pre>
|
|
<div class="p" id="cce_10_0940__p224315113121">If information similar to the following is displayed, the ingress has been created:<pre class="screen" id="cce_10_0940__screen135291174384">NAME CLASS HOSTS ADDRESS PORTS AGE
|
|
ingress-test cce * 121.**.**.** 80 10s</pre>
|
|
</div>
|
|
</p></li></ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="cce_10_0935.html">Advanced Setting Examples of LoadBalancer Ingresses</a></div>
|
|
</div>
|
|
</div>
|
|
|