kubernetes - Configuring load balancer on GCP with ingress for https -


i have troubles configuring ingress service

this how configure kubernetes:

apiversion: apps/v1beta1 kind: deployment metadata: name: web-spa-development-deployment spec: template:   metadata:     labels:       app: web-spa-development-291   spec:     containers:     - name: web-spa-development-291       image: web-spa-development:292       ports:       - containerport: 80 --- apiversion: v1 kind: service metadata: name: web-spa-development-service spec:   type: nodeport   selector:     app: web-spa-development-291   ports:     - port: 80       targetport: 80 --- apiversion: extensions/v1beta1 kind: ingress metadata: name: development-ingress annotations:   kubernetes.io/ingress.global-static-ip-name: staging spec: tls: - hosts:   - dev-app.example.com   secretname: wildcard-cert  rules: - host: dev-app.example.com   http:     paths:     - backend:         servicename: web-spa-development-service         serviceport: 80       path: /*     - backend:         servicename: web-spa-development-service         serviceport: 80       path: / --- 

and in image - nodejs server, serving on port 80.

when ingress , running - accessing web app http/https return index.html in response. doesnt return of static assests - .js, .css, .html.

what possibly problem?

try this:

apiversion: extensions/v1beta1 kind: ingress metadata:   name: development-ingress   annotations:     kubernetes.io/ingress.global-static-ip-name: staging spec:   tls:   - hosts:     - dev-app.example.com     secretname: wildcard-cert    rules:   - host: dev-app.example.com     http:       paths:       - backend:           servicename: web-spa-development-service           serviceport: 80 

see https://kubernetes.io/docs/concepts/services-networking/ingress/#name-based-virtual-hosting


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -