Deploy GitHub Pages
This commit is contained in:
parent
8125e59d3f
commit
c09357b854
51 changed files with 612 additions and 5095 deletions
|
|
@ -596,8 +596,8 @@
|
|||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../user-guide/exposing-tcp-udp-services/" title="Exposing TCP and UDP services" class="md-nav__link">
|
||||
Exposing TCP and UDP services
|
||||
<a href="../../user-guide/ingress-path-matching/" title="Regular expressions in paths" class="md-nav__link">
|
||||
Regular expressions in paths
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
|
@ -916,18 +916,6 @@
|
|||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../customization/custom-upstream-check/" title="Custom Upstream server checks" class="md-nav__link">
|
||||
Custom Upstream server checks
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../customization/external-auth-headers/" title="External authentication" class="md-nav__link">
|
||||
External authentication
|
||||
|
|
@ -1196,48 +1184,25 @@ nodes get static IPs, the IPs are not retained across upgrade.</p>
|
|||
<p>To acquire a static IP for the nginx ingress controller, simply put it
|
||||
behind a Service of <code class="codehilite">Type=LoadBalancer</code>.</p>
|
||||
<p>First, create a loadbalancer Service and wait for it to acquire an IP</p>
|
||||
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6</pre></div></td><td class="code"><div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl create -f static-ip-svc.yaml
|
||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl create -f static-ip-svc.yaml
|
||||
<span class="go">service "nginx-ingress-lb" created</span>
|
||||
|
||||
<span class="gp">$</span> kubectl get svc nginx-ingress-lb
|
||||
<span class="go">NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE</span>
|
||||
<span class="go">nginx-ingress-lb 10.0.138.113 104.154.109.191 80:31457/TCP,443:32240/TCP 15m</span>
|
||||
</pre></div>
|
||||
</td></tr></table>
|
||||
|
||||
<p>then, update the ingress controller so it adopts the static IP of the Service
|
||||
by passing the <code class="codehilite">--publish-service</code> flag (the example yaml used in the next step
|
||||
already has it set to "nginx-ingress-lb").</p>
|
||||
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span>1
|
||||
2</pre></div></td><td class="code"><div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl create -f nginx-ingress-controller.yaml
|
||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl create -f nginx-ingress-controller.yaml
|
||||
<span class="go">deployment "nginx-ingress-controller" created</span>
|
||||
</pre></div>
|
||||
</td></tr></table>
|
||||
|
||||
<h2 id="assigning-the-ip-to-an-ingress">Assigning the IP to an Ingress<a class="headerlink" href="#assigning-the-ip-to-an-ingress" title="Permanent link">¶</a></h2>
|
||||
<p>From here on every Ingress created with the <code class="codehilite">ingress.class</code> annotation set to
|
||||
<code class="codehilite">nginx</code> will get the IP allocated in the previous step</p>
|
||||
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span> 1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16</pre></div></td><td class="code"><div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl create -f nginx-ingress.yaml
|
||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl create -f nginx-ingress.yaml
|
||||
<span class="go">ingress "nginx-ingress" created</span>
|
||||
|
||||
<span class="gp">$</span> kubectl get ing nginx-ingress
|
||||
|
|
@ -1254,19 +1219,10 @@ already has it set to "nginx-ingress-lb").</p>
|
|||
<span class="go">request_uri=http://104.154.109.191:8080/</span>
|
||||
<span class="go">...</span>
|
||||
</pre></div>
|
||||
</td></tr></table>
|
||||
|
||||
<h2 id="retaining-the-ip">Retaining the IP<a class="headerlink" href="#retaining-the-ip" title="Permanent link">¶</a></h2>
|
||||
<p>You can test retention by deleting the Ingress</p>
|
||||
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9</pre></div></td><td class="code"><div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl delete ing nginx-ingress
|
||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl delete ing nginx-ingress
|
||||
<span class="go">ingress "nginx-ingress" deleted</span>
|
||||
|
||||
<span class="gp">$</span> kubectl create -f nginx-ingress.yaml
|
||||
|
|
@ -1276,7 +1232,6 @@ already has it set to "nginx-ingress-lb").</p>
|
|||
<span class="go">NAME HOSTS ADDRESS PORTS AGE</span>
|
||||
<span class="go">nginx-ingress * 104.154.109.191 80, 443 13m</span>
|
||||
</pre></div>
|
||||
</td></tr></table>
|
||||
|
||||
<blockquote>
|
||||
<p>Note that unlike the GCE Ingress, the same loadbalancer IP is shared amongst all
|
||||
|
|
@ -1285,29 +1240,14 @@ controllers.</p>
|
|||
</blockquote>
|
||||
<h2 id="promote-ephemeral-to-static-ip">Promote ephemeral to static IP<a class="headerlink" href="#promote-ephemeral-to-static-ip" title="Permanent link">¶</a></h2>
|
||||
<p>To promote the allocated IP to static, you can update the Service manifest</p>
|
||||
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span>1
|
||||
2</pre></div></td><td class="code"><div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl patch svc nginx-ingress-lb -p <span class="s1">'{"spec": {"loadBalancerIP": "104.154.109.191"}}'</span>
|
||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl patch svc nginx-ingress-lb -p <span class="s1">'{"spec": {"loadBalancerIP": "104.154.109.191"}}'</span>
|
||||
<span class="go">"nginx-ingress-lb" patched</span>
|
||||
</pre></div>
|
||||
</td></tr></table>
|
||||
|
||||
<p>and promote the IP to static (promotion works differently for cloudproviders,
|
||||
provided example is for GKE/GCE)
|
||||
`
|
||||
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span> 1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14</pre></div></td><td class="code"><div class="codehilite"><pre><span></span><span class="gp">$</span> gcloud compute addresses create nginx-ingress-lb --addresses <span class="m">104</span>.154.109.191 --region us-central1
|
||||
<div class="codehilite"><pre><span></span><span class="gp">$</span> gcloud compute addresses create nginx-ingress-lb --addresses <span class="m">104</span>.154.109.191 --region us-central1
|
||||
<span class="go">Created [https://www.googleapis.com/compute/v1/projects/kubernetesdev/regions/us-central1/addresses/nginx-ingress-lb].</span>
|
||||
<span class="go">---</span>
|
||||
<span class="go">address: 104.154.109.191</span>
|
||||
|
|
@ -1321,8 +1261,7 @@ provided example is for GKE/GCE)
|
|||
<span class="go">status: IN_USE</span>
|
||||
<span class="go">users:</span>
|
||||
<span class="go">- us-central1/forwardingRules/a09f6913ae80e11e6a8c542010af0000</span>
|
||||
</pre></div>
|
||||
</td></tr></table></p>
|
||||
</pre></div></p>
|
||||
<p>Now even if the Service is deleted, the IP will persist, so you can recreate the
|
||||
Service with <code class="codehilite">spec.loadBalancerIP</code> set to <code class="codehilite">104.154.109.191</code>.</p>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue