Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/int128/hello-gke-https
Hello world on GKE with multi-domain HTTPS
https://github.com/int128/hello-gke-https
gke kube-lego kubernetes letsencrypt
Last synced: 8 days ago
JSON representation
Hello world on GKE with multi-domain HTTPS
- Host: GitHub
- URL: https://github.com/int128/hello-gke-https
- Owner: int128
- License: apache-2.0
- Created: 2017-12-08T03:21:53.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-08T17:18:04.000Z (about 7 years ago)
- Last Synced: 2024-10-27T08:52:08.077Z (about 2 months ago)
- Topics: gke, kube-lego, kubernetes, letsencrypt
- Language: Shell
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hello GKE with HTTPS
Hello world on GKE with HTTPS ingress by [kube-lego](https://github.com/jetstack/kube-lego).
## Prerequisite
- `gcloud` and `kubectl` are configured for GKE
- Valid email address
- Wildcard domain (e.g. `*.sandbox.example.com`)## How to create
Fix an email address and domain name in YAMLs.
```sh
sed -i -e 's/EMAIL_ADDRESS/[email protected]/g' lego/configmap.yaml
sed -i -e 's/DOMAIN_NAME/sandbox.example.com/g' hello/ingress.yaml
```Create a cluster.
```sh
kubectl version
./create-cluster.sh
```Associate your wildcard domain and the reserved IP address.
Deploy pods and ingress.
```sh
kubectl apply -f lego
kubectl apply -f hello
```See log of kube-lego.
```sh
kubectl logs -f --tail=100 --namespace kube-lego "$(kubectl get pod --namespace kube-lego -l app=kube-lego -o name)"
```Open following URLs.
- https://echo.sandbox.example.com
- https://www.sandbox.example.com## How to cleanup
```sh
./delete-cluster.sh
```