Deploy GitHub Pages
This commit is contained in:
parent
59b6146296
commit
49ea9bd49b
24 changed files with 38 additions and 16 deletions
|
|
@ -2,10 +2,8 @@
|
|||
kind: Ingress
|
||||
metadata:
|
||||
name: ingress-myservicea
|
||||
annotations:
|
||||
# use the shared ingress-nginx
|
||||
kubernetes.io/ingress.class: "nginx"
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
- host: myservicea.foo.org
|
||||
http:
|
||||
|
|
@ -51,7 +49,7 @@ spec:
|
|||
backend:
|
||||
service:
|
||||
name: myservicea
|
||||
port:
|
||||
port:
|
||||
number: 80
|
||||
ingressClassName: nginx
|
||||
---
|
||||
|
|
@ -69,7 +67,7 @@ spec:
|
|||
backend:
|
||||
service:
|
||||
name: myserviceb
|
||||
port:
|
||||
port:
|
||||
number: 80
|
||||
ingressClassName: nginx
|
||||
</code></pre></div> <p>When you apply this yaml, 2 ingress resources will be created managed by the <strong>ingress-nginx</strong> instance. Nginx is configured to automatically discover all ingress with the <code>kubernetes.io/ingress.class: "nginx"</code> annotation or where <code>ingressClassName: nginx</code> is present. Please note that the ingress resource should be placed inside the same namespace of the backend resource.</p> <p>On many cloud providers ingress-nginx will also create the corresponding Load Balancer resource. All you have to do is get the external IP and add a DNS <code>A record</code> inside your DNS provider that point myservicea.foo.org and myserviceb.foo.org to the nginx external IP. Get the external IP by running:</p> <div class=highlight><pre><span></span><code>kubectl get services -n ingress-nginx
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue