Add ingress(es)
This commit is contained in:
parent
9de6690b24
commit
a72bfd523c
|
@ -10,7 +10,7 @@ spec:
|
||||||
selector:
|
selector:
|
||||||
app: api
|
app: api
|
||||||
tier: backend
|
tier: backend
|
||||||
type: LoadBalancer
|
type: ClusterIP
|
||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: minikube-ingress-2
|
||||||
|
annotations:
|
||||||
|
nginx.ingress.kubernetes.io/ssl-redirect: "false"
|
||||||
|
nginx.ingress.kubernetes.io/use-regex: "true"
|
||||||
|
nginx.ingress.kubernetes.io/rewrite-target: /$2
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- http:
|
||||||
|
paths:
|
||||||
|
- path: /api(/|$)(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: api
|
||||||
|
port:
|
||||||
|
number: 5000
|
|
@ -11,7 +11,7 @@ spec:
|
||||||
selector:
|
selector:
|
||||||
app: client
|
app: client
|
||||||
tier: frontend
|
tier: frontend
|
||||||
type: LoadBalancer
|
type: ClusterIP
|
||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: minikube-ingress
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: client
|
||||||
|
port:
|
||||||
|
number: 8080
|
|
@ -2,7 +2,8 @@ import { Axios, AxiosError } from "axios";
|
||||||
import { Credentials, Token, User, Zone } from "./Types";
|
import { Credentials, Token, User, Zone } from "./Types";
|
||||||
|
|
||||||
const instance = new Axios({
|
const instance = new Axios({
|
||||||
baseURL: "http://127.0.0.1:5000/",
|
// baseURL: "http://api:5000/",
|
||||||
|
baseURL: "/api/",
|
||||||
headers: {
|
headers: {
|
||||||
accept: "application/json",
|
accept: "application/json",
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: minikube-ingress
|
||||||
|
annotations:
|
||||||
|
nginx.ingress.kubernetes.io/ssl-redirect: "false"
|
||||||
|
nginx.ingress.kubernetes.io/use-regex: "true"
|
||||||
|
nginx.ingress.kubernetes.io/rewrite-target: /$2
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
# - host: kube.slc.ar
|
||||||
|
- http:
|
||||||
|
paths:
|
||||||
|
- path: /()(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: client
|
||||||
|
port:
|
||||||
|
number: 8080
|
||||||
|
- path: /api(/|$)(.*)
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: api
|
||||||
|
port:
|
||||||
|
number: 5000
|
Loading…
Reference in New Issue