Kubernetes HTTPS Ingress in Google Container Engine

0 votes
I'm trying to expose an HTTP service running on Google Container Engine(GKE) on an HTTPS only load balancer. I want to know how I can initialize an ingress object with HTTPS only load balancer rather than regular HTTP? Or if there's any other way I can block HTTP protocol from creating load balancer. Because whenever I try and add HTTPS protocol and try and drop HTTP, it is automatically recreated later by the platform.
Ingress:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: myapp-ingress
spec:
  backend:
    serviceName: myapp-service
    servicePort: 8080
Nov 23, 2018 in Kubernetes by shubham
• 6,890 points
53 views

1 answer to this question.

0 votes

n order to have HTTPs service exposed only, you can block traffic on port 80 as mentioned on this link:

What you can do is block all traffic on port 80 like here:

You can block traffic on :80 through an annotation. You might want to do this if all your clients are only going to hit the loadbalancer through https and you don't want to waste the extra GCE forwarding rule, eg:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: test
  annotations:
    kubernetes.io/ingress.allow-http: "false"
spec:
  tls:
  # This assumes tls-secret exists.
  # To generate it run the make in this directory.
  - secretName: tls-secret
  backend:
    serviceName: echoheaders-https
    servicePort: 80
answered Nov 23, 2018 by DareDev
• 6,810 points

Related Questions In Kubernetes

0 votes
1 answer
0 votes
1 answer

How to use gravitational teleport in a container/kubernetes environment?

You can use teleport to augment kubernetes ...READ MORE

answered Jun 28, 2018 in Kubernetes by ajs3033
• 7,280 points
324 views
0 votes
2 answers

run private docker images on Google Container Engine

run docker login on minions before starting.  ...READ MORE

answered Aug 30, 2018 in Kubernetes by Nilesh
• 6,880 points
32 views
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17 in Others by anonymous
2,168 views
+3 votes
1 answer
0 votes
3 answers

Using multiple commands in a kubernetes yaml file

Try something like this: containers: - name: ...READ MORE

answered Apr 23 in Kubernetes by lyza
4,892 views
0 votes
1 answer

How do I sign-in to kubernetes dashboard?

Since version 1.7 Dashboard uses more secure ...READ MORE

answered Sep 7, 2018 in Kubernetes by DareDev
• 6,810 points
138 views