Skip to content

Commit 646a801

Browse files
authored
Merge pull request #105526 from veyalla/master
k8s pub preview refresh
2 parents 7916554 + 8fea4ff commit 646a801

File tree

4 files changed

+13
-69
lines changed

4 files changed

+13
-69
lines changed

articles/iot-edge/how-to-install-iot-edge-kubernetes.md

Lines changed: 13 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -12,83 +12,27 @@ services: iot-edge
1212

1313
# How to install IoT Edge on Kubernetes (Preview)
1414

15-
IoT Edge can integrate with Kubernetes using it as a resilient, highly available infrastructure layer. It registers an IoT Edge *Custom Resource Definition* (CRD) with the Kubernetes API Server. Additionally, it provides an *Operator* (IoT Edge agent) that reconciles cloud-managed desired state with the local cluster state.
15+
IoT Edge can integrate with Kubernetes using it as a resilient, highly available infrastructure layer. Here is where this support fits in a high level IoT Edge solution:
1616

17-
Module lifetime is managed by the Kubernetes scheduler, which maintains module availability and chooses their placement. IoT Edge manages the edge application platform running on top, continuously reconciling the desired state specified in IoT Hub with the state on the edge cluster. The edge application model is still the familiar model based on IoT Edge modules and routes. The IoT Edge agent operator performs *automatic* translation to the Kubernetes natives constructs like pods, deployments, services etc.
17+
![k8s intro](./media/how-to-install-iot-edge-kubernetes/kubernetes-model.png)
18+
19+
>[!TIP]
20+
>A good mental model for this integration is to think of Kubernetes as another operating environment IoT Edge applications can run on in addition to Linux and Windows.
21+
22+
## Architecture
23+
On Kubernetes, IoT Edge provides *Custom Resource Definition* (CRD) for edge workload deployments. IoT Edge Agent assumes the role of a *CRD controller* that reconciles cloud-managed desired state with the local cluster state.
24+
25+
Module lifetime is managed by the Kubernetes scheduler, which maintains module availability and chooses their placement. IoT Edge manages the edge application platform running on top, continuously reconciling the desired state specified in IoT Hub with the state on the edge cluster. The application model is still the familiar model based on IoT Edge modules and routes. The IoT Edge Agent controller performs *automatic* translation IoT Edge's application model to the Kubernetes native constructs like pods, deployments, services etc.
1826

1927
Here is a high-level architecture diagram:
2028

21-
![kubernetes arch](./media/how-to-install-iot-edge-kubernetes/k8s-arch.png)
29+
![kubernetes arch](./media/how-to-install-iot-edge-kubernetes/publicpreview-refresh-kubernetes.png)
2230

2331
Every component of the edge deployment is scoped to a Kubernetes namespace specific to the device, making it possible to share the same cluster resources among multiple edge devices and their deployments.
2432

2533
>[!NOTE]
2634
>IoT Edge on Kubernetes is in [public preview](https://azure.microsoft.com/support/legal/preview-supplemental-terms/).
2735
28-
## Install locally for a quick test environment
29-
30-
### Prerequisites
31-
32-
* Kubernetes 1.10 or newer. If you don't have an existing cluster setup, you can use [Minikube](https://kubernetes.io/docs/setup/minikube/) for a local cluster environment.
33-
34-
* [Helm](https://helm.sh/docs/using_helm/#quickstart-guide), the Kubernetes package manager.
35-
36-
* [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) for viewing and interacting with the cluster.
37-
38-
### Setup steps
39-
40-
1. Start **Minikube**
41-
42-
``` shell
43-
minikube start
44-
```
45-
46-
1. Initialize the **Helm** server component (*tiller*) in your cluster
47-
48-
``` shell
49-
helm init
50-
```
51-
52-
1. Add IoT Edge repo and update the helm installation
53-
54-
``` shell
55-
helm repo add edgek8s https://edgek8s.blob.core.windows.net/helm/
56-
helm repo update
57-
```
58-
59-
1. [Create an IoT Hub](../iot-hub/iot-hub-create-through-portal.md), [register an IoT Edge device](how-to-register-device.md), and note its connection string.
60-
61-
1. Install iotedged and IoT Edge agent into your cluster
62-
63-
```shell
64-
helm install \
65-
--name k8s-edge1 \
66-
--set "deviceConnectionString=replace-with-device-connection-string" \
67-
edgek8s/edge-kubernetes
68-
```
69-
70-
1. Open the Kubernetes dashboard in the browser
71-
72-
```shell
73-
minikube dashboard
74-
```
75-
76-
Under the cluster namespaces, you will see one for the IoT Edge device following the convention *msiot-\<iothub-name>-\<edgedevice-name>*. The IoT Edge agent and iotedged pods should be up and running in this namespace.
77-
78-
1. Add a simulated temperature sensor module using the steps in the [Deploy a module](quickstart-linux.md#deploy-a-module) section of the quickstart. IoT Edge module management is done from the IoT Hub portal just like any other IoT Edge device. Making local changes to module configuration via Kubernetes tools is not recommended as they might get overwritten.
79-
80-
1. In a few seconds, refreshing the **Pods** page under the edge device namespace in the dashboard will list the IoT Edge hub and simulated sensor pods as running with the IoT Edge hub pod ingesting data into IoT Hub.
81-
82-
## Clean up resources
83-
84-
To remove all resources created by the edge deployment, use the following command with the name used in step 5 of the previous section.
85-
86-
``` shell
87-
helm delete --purge k8s-edge1
88-
```
89-
90-
## Next steps
91-
92-
### Deploy as a highly available edge gateway
36+
## Tutorials and references
9337

94-
The edge device in a Kubernetes cluster can be used as an IoT gateway for downstream devices. It can be configured to be resilient to node failure thus providing high availability to edge deployments. See this [detailed walkthrough](https://github.com/Azure-Samples/iotedge-gateway-on-kubernetes) to use IoT Edge in this scenario.
38+
Please see the [IoT Edge on Kubernetes preview docs mini-site](https://aka.ms/edgek8sdoc) for more information, including in-depth tutorials and references.
246 KB
Loading
395 KB
Loading

0 commit comments

Comments
 (0)