You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/blog/rpi-netboot-automation.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -190,7 +190,7 @@ configure_pxe_services() {
190
190
191
191
The `addresslist.txt` file serves as a record of processed MAC addresses. Before executing the setup for a new MAC address, the script checks this list to ensure it hasn't already been configured. This prevents unnecessary duplication of efforts. Create `addresslist.txt` in the `/opt` directory. Here's an example of how the `addresslist.txt` file might look:
Copy file name to clipboardExpand all lines: content/blog/rpi-netboot-deep-dive.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,14 +11,14 @@ weight: 1
11
11
12
12
### What is PXE Boot?
13
13
14
-
The Preboot Execution Environment (PXE) specification describes a standardized client–server environment that boots a software assembly retrieved from a network on PXE-enabled clients.
14
+
The Preboot Execution Environment (PXE) specification describes a standardized client-server environment that boots a software assembly retrieved from a network on PXE-enabled clients.
15
15
16
16
### Why PXE Boot?
17
17
18
18
- Simplify Pi provisioning and maintenance as much as possible.
19
19
- Automate updates/upgrades as much as possible.
20
20
21
-
Netbooting is a good path to achieve this. For example, when you netboot a Pi, it does not require an SD card to boot. The OS and file system live on a central server. Because most of the provisioning happens on a central server, we can eventually automate it via scripts.
21
+
Netbooting is a good path to achieve this. For example, when you netboot a Pi, it does not require an SD card to boot. The OS and file system live on a central server. Because most provisioning happens on a central server, we can eventually automate it via scripts.
22
22
23
23
### PXE Boot Sequence
24
24
@@ -66,7 +66,7 @@ Netbooting is a good path to achieve this. For example, when you netboot a Pi, i
66
66
To implement netbooting for Raspberry Pi devices, you'll need the following components:
67
67
68
68
- Raspberry Pi units acting as PXE clients connected via Ethernet to the router or switch.
69
-
- Raspberry Pi acting as a PXE server containing boot files and user files connected via Ethernet to the router or switch.
69
+
- Raspberry Pi as a PXE server containing boot files and user files connected via Ethernet to the router or switch.
**Important Note:** Replace `192.168.XX.XX` with the IP address of PXE server and `<MAC_ADDRESS>` with the MAC address of PXE client.
136
137
137
138
#### Configure `dnsmasq.conf`
@@ -156,4 +157,4 @@ EOF
156
157
157
158
### Conclusion
158
159
159
-
In conclusion, implementing PXE boot for Raspberry Pi devices streamlines deployment and maintenance by centralizing the boot process and file systems. Automation of these processes further enhances efficiency and reduces manual intervention. To learn more about automating Raspberry Pi deployment using PXE boot, click [here](https://www.infraspec.dev/blog/rpi-netboot-automation).
160
+
In conclusion, implementing PXE boot for Raspberry Pi devices streamlines deployment and maintenance by centralizing the boot process and file systems. Automation of these processes further enhances efficiency and reduces manual intervention. To learn more about automating Raspberry Pi deployment using PXE boot, click [here](https://www.infraspec.dev/blog/rpi-netboot-automation).
Copy file name to clipboardExpand all lines: content/blog/setting-up-ingress-on-eks.md
+49-42Lines changed: 49 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,31 +11,31 @@ weight: 1
11
11
12
12
* * * * *
13
13
14
-
**What is an Ingress?**
15
-
-----------------------
14
+
## What is an Ingress?
16
15
17
16
An Ingress in Kubernetes provides external access to your Kubernetes services. You configure access by creating a collection of routing rules that define which requests reach which services.
18
17
19
18
This lets you consolidate your routing rules into a single resource. For example, you might want to send requests to [mydomain.com/](http://example.com/api/v1)api1 to the api1 service, and requests to [mydomain.com/](http://example.com/api/v2)api2 to the api2 service. With an Ingress, you can easily set this up without creating a bunch of LoadBalancers or exposing each service on the Node.
20
19
21
20
*An Ingress provides the following:*
22
21
23
-
-Externally reachable URLs for applications deployed in Kubernetes clusters
24
-
-Name-based virtual host and URI-based routing support
25
-
-Load Balancing rules and traffic, as well as SSL termination
22
+
- Externally reachable URLs for applications deployed in Kubernetes clusters
23
+
- Name-based virtual host and URI-based routing support
24
+
- Load Balancing rules and traffic, as well as SSL termination
26
25
27
-
**Kubernetes Service types -- an overview**
28
-
------------------------------------------
26
+
## Kubernetes Service types -- an overview
29
27
30
28
### ClusterIP
31
29
32
30
A ClusterIP service is the default service. It gives you a service inside your cluster that other apps inside your cluster can access. There is no external access.
@@ -76,7 +76,9 @@ A NodePort service is the most primitive way to get external traffic directly to
76
76
77
77
When we create a Service of type NodePort, Kubernetes gives us a nodePort value. Then the Service is accessible by using the IP address of any node along with the nodePort value. In other words, when a user sets the Service type field to NodePort, the Kubernetes master allocates a static port from a range, and each Node will proxy that port (the same port number on every Node) into our Service.
@@ -128,11 +130,13 @@ In case of AWS -- will create an AWS Load Balancer, by default Classic type, whi
128
130
129
131
`LoadBalancer` type provides a Public IP address or DNS name to which the external users can connect. The traffic flows from the LoadBalancer to a mapped service on a designated port, which eventually forwards it to the healthy pods. Note that LoadBalancers doesn't have a direct mapping to the pods.
-will provide a basic load-balancing to pods on different EC2
172
-
-will give an ability to terminate SSL/TLS sessions
173
-
-doesn't support level-7 routing
173
+
- will provide external access to pods
174
+
- will provide a basic load-balancing to pods on different EC2
175
+
- will give an ability to terminate SSL/TLS sessions
176
+
- doesn't support level-7 routing
174
177
175
178
*The big downside is that each service you expose with a LoadBalancer will get its own IP address, and you have to pay for a LoadBalancer per exposed service, which can get expensive!*
176
179
177
-
Ingress
178
-
-------
180
+
## Ingress
179
181
180
182
Unlike all the above examples, Ingress is actually NOT a dedicated Service. Instead, it sits in front of multiple services and act as a "smart router" or entrypoint into your cluster.
181
183
182
184
It just describes a set of rules for the Kubernetes Ingress Controller to create a Load Balancer, its Listeners, and routing rules for them.
183
185
184
186
An Ingress does not expose arbitrary ports or protocols. Exposing services other than HTTP and HTTPS to the internet typically uses a service of type [Service.Type=NodePort](https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport) or [Service.Type=LoadBalancer](https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer).
@@ -249,7 +255,7 @@ This has set up the Nginx Ingress Controller. Now, we can create Ingress resourc
249
255
250
256
First, let's create two services to demonstrate how the Ingress routes our request. We'll run two web applications that output a slightly different response.
251
257
252
-
```shell
258
+
```yaml
253
259
apiVersion: v1
254
260
kind: Pod
255
261
metadata:
@@ -278,7 +284,7 @@ spec:
278
284
279
285
```
280
286
281
-
```shell
287
+
```yaml
282
288
apiVersion: v1
283
289
kind: Pod
284
290
metadata:
@@ -309,15 +315,15 @@ spec:
309
315
310
316
Create the resources
311
317
312
-
```shell
318
+
```bash
313
319
$ kubectl apply -f apple.yaml
314
320
$ kubectl apply -f banana.yaml
315
321
316
322
```
317
323
318
324
Now, declare an Ingress to route requests to `/apple` to the first service, and requests to `/banana` to second service.
319
325
320
-
```shell
326
+
```yaml
321
327
apiVersion: networking.k8s.io/v1
322
328
kind: Ingress
323
329
metadata:
@@ -349,7 +355,7 @@ Here we set two rules: if URI == */apple* or */banana* -- then send the traffi
349
355
350
356
Deploy it:
351
357
352
-
```shell
358
+
```bash
353
359
$ kubectl apply -f ingress.yaml
354
360
355
361
```
@@ -358,7 +364,7 @@ Another example is the hostname-based routing.
358
364
359
365
*Update the manifest:*
360
366
361
-
```shell
367
+
```yaml
362
368
apiVersion: networking.k8s.io/v1
363
369
kind: Ingress
364
370
metadata:
@@ -393,13 +399,15 @@ The Ingress controller provisions an implementation-specific load balancer that
393
399
394
400
Name-based virtual hosts support routing HTTP traffic to multiple host names at the same IP address.
395
401
396
-

402
+
<palign="center">
403
+
<imgwidth="500px"src="/images/blog/setting-up-ingress-on-eks/name-based-virtual-hosting.png"alt="Name based virtual hosting">
The following Ingress tells the backing load balancer to route requests based on the Host header.
401
409
402
-
```shell
410
+
```yaml
403
411
apiVersion: networking.k8s.io/v1
404
412
kind: Ingress
405
413
metadata:
@@ -431,8 +439,7 @@ spec:
431
439
432
440
Here we left Services without changes, but in the Rules, we set that a request to the *[apple.service.com](http://apple.service.com)* must be sent to the *apple-service* and *[banana.service.com](http://banana.service.com)* to the banana-service.
433
441
434
-
Summary
435
-
-------
442
+
## Summary
436
443
437
444
A Kubernetes Ingress is a robust way to expose your services outside the cluster. It lets you consolidate your routing rules to a single resource, and gives you powerful options for configuring these rules.
0 commit comments