murphye/cheap-gke-cluster

Implement HTTPS

murphye opened this issue · 2 comments

How to do with gcloud

gcloud beta compute url-maps create regional-l7-xlb-map-https \
--default-service=l7-xlb-backend-service-http \
--region=us-west4

openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout tls.key -out tls.crt -subj "/CN=*"

gcloud beta compute ssl-certificates create l7-xlb-cert \
--certificate=tls.crt \
--private-key=tls.key \
--region=us-west4

gcloud beta compute target-https-proxies create l7-xlb-proxy-https \
--url-map=regional-l7-xlb-map-https \
--region=us-west4 \
--ssl-certificates=l7-xlb-cert

gcloud beta compute forwarding-rules create l7-xlb-forwarding-rule-https \
--load-balancing-scheme=EXTERNAL_MANAGED \
--network-tier=STANDARD \
--network=my-network \
--ports=443 \
--region=us-west4 \
--target-https-proxy=l7-xlb-proxy-https \
--target-https-proxy-region=us-west4 \
--address=my-static-ip

Implementing HTTPS and HTTP redirect. README updated with instructions.