https://github.com/nattatorn-dev/k8s-traefik
https://github.com/nattatorn-dev/k8s-traefik
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/nattatorn-dev/k8s-traefik
- Owner: nattatorn-dev
- Created: 2019-02-07T19:02:36.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-07T19:17:57.000Z (over 6 years ago)
- Last Synced: 2025-03-29T05:38:06.817Z (about 2 months ago)
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# kubernetes-traefik
- Create TLS certificate:
```
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ./tls.key -out ./tls.crt -subj "/CN=*.example.com"
```This examples uses 2 different certificates to terminate SSL for 2 hostnames.
Deploy the controller by creating the rc in the parent dir
Create tls secret for foo.bar.com
Create rc-ssl.yaml
Next create a SSL certificate for foo.bar.com host:openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /tmp/tls.key -out /tmp/tls.crt -subj "/CN=foo.bar.com"
Now store the SSL certificate in a secret:kubectl create secret tls foo-secret --key /tmp/tls.key --cert /tmp/tls.crt
- Create a TLS secret:
```
kubectl create secret tls cert - - key ./tls.key --cert ./tls.crt
```- Apply deployment file:
```
kubectl apply -f deployment.yaml
```