Giter Club home page Giter Club logo

iotedge-k8s-doc's Introduction

⚠️ Deprecation notice

This preview integration of IoT Edge 1.x and Kubernetes will not be made generally available, and is no longer supported. The recommended way to run IoT Edge 1.x on Kubernetes is noted in the product's official docs.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Legal Notices

Microsoft and any contributors grant you a license to the Microsoft documentation and other content in this repository under the Creative Commons Attribution 4.0 International Public License, see the LICENSE file, and grant you a license to any code in the repository under the MIT License, see the LICENSE-CODE file.

Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries. The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks. Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653.

Privacy information can be found at https://privacy.microsoft.com/en-us/

Microsoft and any contributors reserve all other rights, whether under their respective copyrights, patents, or trademarks, whether by implication, estoppel or otherwise.

iotedge-k8s-doc's People

Contributors

ggjjj avatar microsoftopensource avatar rangv avatar veyalla avatar vincent-pli avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

iotedge-k8s-doc's Issues

Edgeagent error "Not supported on k8s"

Hi team,

Deployed IoT Hub with Private Endpoint (required DNS forwarding for on-premise in place).
Deployed helm chart as below, where the $connStr variable is the connection string from the IoT Hub:

helm repo add iot-edge https://edgek8s.blob.core.windows.net/staging
helm repo update

helm upgrade --install edgebroker iot-edge/edge-kubernetes `
  --namespace mynamespace `
  --set "provisioning.deviceConnectionString=$connStr"

Helm chart is successfully deployed:

NAME            NAMESPACE       REVISION        UPDATED                                 STATUS          CHART                   APP VERSION
edgebroker      mynamespace   1               2021-05-12 14:47:52.38 +0200 CEST       deployed        edge-kubernetes-0.2.12  1.0

Environment: Bare metal Kubernetes v1.19.7 with Ingress Controller

OS-IMAGE             KERNEL-VERSION     CONTAINER-RUNTIME
Ubuntu 20.04.1 LTS   5.4.0-66-generic   containerd://1.4.3

Prerequired firewall openings are in place.

Getting the below error in the edgeagent logs, resulting in a CrashLoopBackOff of the edgeagent pod:

2021-05-17 07:21:23  Starting Edge Agent
2021-05-17 07:21:26.445 +00:00 Edge Agent Main()
<6> 2021-05-17 07:21:34.639 +00:00 [INF] - Initializing Edge Agent.
<6> 2021-05-17 07:21:42.240 +00:00 [INF] - Version - 1.1-k8s-beta14.40964814 (167db05eea0df2c806655a69d8e9549c3293a4ce)
<6> 2021-05-17 07:21:42.242 +00:00 [INF] -
        █████╗ ███████╗██╗   ██╗██████╗ ███████╗
       ██╔══██╗╚══███╔╝██║   ██║██╔══██╗██╔════╝
       ███████║  ███╔╝ ██║   ██║██████╔╝█████╗
       ██╔══██║ ███╔╝  ██║   ██║██╔══██╗██╔══╝
       ██║  ██║███████╗╚██████╔╝██║  ██║███████╗
       ╚═╝  ╚═╝╚══════╝ ╚═════╝ ╚═╝  ╚═╝╚══════╝

 ██╗ ██████╗ ████████╗    ███████╗██████╗  ██████╗ ███████╗
 ██║██╔═══██╗╚══██╔══╝    ██╔════╝██╔══██╗██╔════╝ ██╔════╝
 ██║██║   ██║   ██║       █████╗  ██║  ██║██║  ███╗█████╗
 ██║██║   ██║   ██║       ██╔══╝  ██║  ██║██║   ██║██╔══╝
 ██║╚██████╔╝   ██║       ███████╗██████╔╝╚██████╔╝███████╗
 ╚═╝ ╚═════╝    ╚═╝       ╚══════╝╚═════╝  ╚═════╝ ╚══════╝

<6> 2021-05-17 07:21:44.139 +00:00 [INF] - Experimental features configuration: {"Enabled":true,"DisableCloudSubscriptions":false}
<6> 2021-05-17 07:21:44.840 +00:00 [INF] - Experimental features configuration: {"Enabled":true,"EnableExtensions":true}
<6> 2021-05-17 07:21:52.142 +00:00 [INF] - Installing certificates [CN=Test Edge Owner CA:08/10/2021 17:06:59] to Root
<6> 2021-05-17 07:21:57.741 +00:00 [INF] - Starting metrics listener on Host: *, Port: 9600, Suffix: /metrics
<6> 2021-05-17 07:22:04.338 +00:00 [INF] - System Resource Metrics are NOT being collected
<6> 2021-05-17 07:22:04.538 +00:00 [INF] - Collecting metadata metrics
<6> 2021-05-17 07:22:07.140 +00:00 [INF] - Set metadata metrics: 1.1-k8s-beta14.40964814 (167db05eea0df2c806655a69d8e9549c3293a4ce), {"Enabled":true,"DisableCloudSubscriptions":false}, {"OperatingSystemType":"Kubernetes","Architecture":"[{\"name\":\"amd64\",\"nodes_count\":6}]","Version":"1.1.1","Provisioning":{"Type":"Not supported on k8s","DynamicReprovisioning":false},"ServerVersion":"Not supported on k8s","KernelVersion":"Not supported on k8s","OperatingSystem":"Not supported on k8s","NumCpus":0,"Virtualized":"unknown"}, True

The iotedged pod is running successfully, some SSL warnings in the logs:

<6>2021-05-15T03:36:44Z [INFO] - [mgmt] - - - [2021-05-15 03:36:44.303677691 UTC] "GET /systeminfo?api-version=2019-01-30 HTTP/1.1" 200 OK 365 "-" "kube-probe/1.19" auth_id(-)
<6>2021-05-15T03:36:48Z [INFO] - [mgmt] - - - [2021-05-15 03:36:48.749409586 UTC] "GET /systeminfo?api-version=2019-01-30 HTTP/1.1" 200 OK 365 "-" "kube-probe/1.19" auth_id(-)
<6>2021-05-15T03:36:54Z [INFO] - [mgmt] - - - [2021-05-15 03:36:54.303297731 UTC] "GET /systeminfo?api-version=2019-01-30 HTTP/1.1" 200 OK 365 "-" "kube-probe/1.19" auth_id(-)
<4>2021-05-15T03:36:57Z [WARN] - error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca:s3_pkt.c:1498:SSL alert number 48
<6>2021-05-15T03:36:58Z [INFO] - [mgmt] - - - [2021-05-15 03:36:58.705763256 UTC] "GET /systeminfo?api-version=2019-01-30 HTTP/1.1" 200 OK 365 "-" "kube-probe/1.19" auth_id(-)
<4>2021-05-15T03:36:59Z [WARN] - error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca:s3_pkt.c:1498:SSL alert number 48
<4>2021-05-15T03:37:02Z [WARN] - error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca:s3_pkt.c:1498:SSL alert number 48
<6>2021-05-15T03:37:03Z [INFO] - Checking edge runtime status
<6>2021-05-15T03:37:03Z [INFO] - Edge runtime is running.
<6>2021-05-15T03:37:04Z [INFO] - [mgmt] - - - [2021-05-15 03:37:04.304123602 UTC] "GET /systeminfo?api-version=2019-01-30 HTTP/1.1" 200 OK 365 "-" "kube-probe/1.19" auth_id(-)
<4>2021-05-15T03:37:05Z [WARN] - error:14094418:SSL routines:ssl3_read_bytes:tlsv1 alert unknown ca:s3_pkt.c:1498:SSL alert number 48

Resulting in that I cannot see the IoT Edge device in the IoT Hub in the Azure Portal.

Expected behavior:
Installation of edgeagent successfully by deploying Helm chart with no errors. IoT Edge showing in Azure Portal.

We may wish to have the user change to the helloworld namespace

We might update the docs, per below:

Setup steps
Register an IoT Edge device and deploy the simulated temperature sensor module. Be sure to note the device's connection string.

Create a Kubernetes namespace to install the edge deployment into.
kubectl create ns helloworld

Unless we set-context to helloworld the helloworld helm will deploy into the current namespace..
eg: we might add:
kubectl config set-context $(kubectl config current-context) --namespace=helloworld

Howto: Scheduling on specific nodes on Azure Stack Edge?

This is not an issue ticket on documentation. But this is only place where we have technical documentation for IoT Edge on Kubernetes. Kindly guide if the query should be raised at a different forum.

Background: I am using Azure Stack Edge (ASE) as a transparent gateway for a downstream device as in this Microsoft doc [link]. But on ASE reboots, edgeHub could be started on any Kubernetes node and so it's External Endpoint (IP) could change. Requesting your guidance on how to access ASE edgeHub in a consistent fashion?

Question: For that, I tried following nodeselector.md [link] document and added "k8s-experimental": { "nodeSelector": { "edgehub": "true" } }. But on ASE, we cannot label nodes with command kubectl label nodes <node-name> edgehub=true . On ASE, all we have is the deployment manifest. Requesting guidance.

Using 'microk8s' on Ubuntu 18.04, getting 'Error: This command needs 1 argument: chart name'

Running on Ubuntu 18.04 on x64, I am getting the error 'Error: This command needs 1 argument: chart name' when I try to run step 3 of: https://microsoft.github.io/iotedge-k8s-doc/examples/helloworld.html as shown below:

root@up1:~# uname -a
Linux up1 5.3.0-53-generic #47~18.04.1-Ubuntu SMP Thu May 7 13:10:50 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
root@up1:~# microk8s status
microk8s is running
addons:
dns: enabled
helm: enabled
storage: enabled
cilium: disabled
dashboard: disabled
fluentd: disabled
gpu: disabled
helm3: disabled
host-access: disabled
ingress: disabled
istio: disabled
jaeger: disabled
knative: disabled
kubeflow: disabled
linkerd: disabled
metallb: disabled
metrics-server: disabled
prometheus: disabled
rbac: disabled
registry: disabled
root@up1:~# microk8s helm install --repo https://edgek8s.blob.core.windows.net/staging edge-crd edge-kubernetes-crd
Error: This command needs 1 argument: chart name

My install process:

  1. install 18.04 Ubuntu on a x64 physical host.
  2. snap install microk8s --classic
  3. export PATH=/snap/bin:$PATH
  4. microk8s enable dns storage helm kubectl
  5. microk8s helm init
  6. microk8s kubectl create ns helloworld
  7. microk8s helm install --repo https://edgek8s.blob.core.windows.net/staging edge-crd edge-kubernetes-crd

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.