Skip to content

Commit 22ebb2c

Browse files
fix(post): Fix formatting on traefik + cert-manager
1 parent 544b447 commit 22ebb2c

File tree

1 file changed

+43
-30
lines changed

1 file changed

+43
-30
lines changed

_posts/2022-08-06-kube-traefik-cert-manager-le.md

Lines changed: 43 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ If you need to install a new kubernetes cluster you can use my [Ansible Playbook
2424

2525
## Resources
2626

27-
You can find all of the resources from this tutorial [here](https://github.com/techno-tim/launchpad/tree/master/kubernetes/traefik-cert-manager)
27+
> You can find all of the resources from this tutorial [here](https://github.com/techno-tim/launchpad/tree/master/kubernetes/traefik-cert-manager)
28+
{: .prompt-success }
2829

2930
### helm
3031

@@ -81,7 +82,7 @@ Check the status of the Traefik ingress controller service
8182
kubectl get svc --all-namespaces -o wide
8283
```
8384

84-
should see traefik with the specified IP
85+
We should see traefik with the specified IP
8586

8687
```console
8788
NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR
@@ -96,7 +97,7 @@ traefik traefik LoadBalancer 10.43.156.161 192.168.30.80
9697
kubectl get pods --namespace traefik
9798
```
9899

99-
should see
100+
We should see pods in the `traefik` namespace
100101

101102
```console
102103
NAME READY STATUS RESTARTS AGE
@@ -115,7 +116,7 @@ kubectl apply -f default-headers.yaml
115116
kubectl get middleware
116117
```
117118

118-
should see
119+
We should see our headers
119120

120121
```console
121122
NAME AGE
@@ -124,83 +125,86 @@ default-headers 25s
124125

125126
### dashboard
126127

127-
install `htpassword`
128+
Install `htpassword`
128129

129130
```bash
130131
sudo apt-get update
131132
sudo apt-get install apache2-utils
132133
```
133134

134-
generate password
135+
Generate a credential / password that's base64 encoded
135136

136137
```bash
137138
htpasswd -nb techno password | openssl base64
138139
```
139140

140-
apply secret
141+
Apply secret
141142

142143
```bash
143144
kubectl apply -f secret-dashboard.yaml
144145
```
145146

146-
get secret
147+
Get secret
147148

148149
```bash
149150
kubectl get secrets --namespace traefik
150151
```
151152

152-
apply middleware
153+
Apply middleware
153154

154155
```bash
155156
kubectl apply -f middleware.yaml
156157
```
157158

158-
apply dashboard
159+
Apply dashboard
159160

160161
```bash
161162
kubectl apply -f ingress.yaml
162163
```
163164

164-
visit
165+
Visit `https://traefik.local.example.com`
165166

166-
<https://traefik.local.technotim.live/>
167-
168-
169-
## sample workload
167+
## Sample Workload
170168

171169
```bash
172170
kubectl apply -f deployment.yaml
173171
kubectl apply -f service.yaml
174172
kubectl apply -f ingress.yaml
175173
```
176174

177-
or folder
175+
Or you can apply an entire folder at once!
178176

179177
```bash
180178
kubectl apply -f nginx
181179
```
182180

183181
## cert-manager
184182

185-
add repo
183+
Add repo
186184

187185
```bash
188186
helm repo add jetstack https://charts.jetstack.io
189187
```
190188

189+
Update it
190+
191191
```bash
192192
helm repo update
193193
```
194194

195+
Create our namespace
196+
195197
```bash
196198
kubectl create namespace cert-manager
197199
```
198200

201+
Get all namespaces
202+
199203
```bash
200204
kubectl get namespaces
201205
```
202206

203-
should see
207+
We should see
204208

205209
```console
206210
NAME STATUS AGE
@@ -213,60 +217,69 @@ metallb-system Active 21h
213217
traefik Active 4h35m
214218
```
215219

216-
apply crds (1.9.1)
220+
Apply crds (1.9.1)
221+
222+
> *Note: Be sure to change this to the [latest version](https://cert-manager.io/docs/installation/supported-releases/) of `cert-manager`*
223+
{: .prompt-info }
217224

218225
```bash
219226
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.9.1/cert-manager.crds.yaml
220227
```
221228

229+
Install with helm
230+
222231
```bash
223232
helm install cert-manager jetstack/cert-manager --namespace cert-manager --values=values.yaml --version v1.9.1
224233
```
225234

226-
secrets
235+
Apply secrets
227236

228237
```bash
229238
kubectl apply -f secret-cf-token.yaml
230239
kubectl apply -f secret-cf-email.yaml
231240
```
232241

233-
issuers
234-
242+
Apply `ClusterIssuer`s
235243

236244
```bash
237245
kubectl apply -f letsencrypt-staging.yaml
238246
```
239247

240-
create certs
248+
Create certs
241249

242-
staging
250+
### staging
243251

244-
from staging folder
252+
From staging folder
245253

246254
```bash
247255
kubectl apply -f technotim-live-cert.yaml
248256
```
249257

250-
looks at logs
251-
252-
can tail with
258+
Check the logs
253259

254260
```bash
255261
kubectl logs -n cert-manager -f cert-manager-877fd747c-fjwhp
256262
```
257263

258-
get challenges
264+
Get `challenges`
259265

260266
```bash
261267
kubectl get challenges
262268
```
263269

264-
or more details with
270+
Get more details
265271

266272
```bash
267273
kubectl describe order local-technotim-live-frm2z-1836084675
268274
```
269275

276+
### production
277+
278+
From production folder
279+
280+
```bash
281+
kubectl apply -f technotim-live-cert.yaml
282+
```
270283

271284
## Links
272285

0 commit comments

Comments
 (0)