亿迅智能制造网
工业4.0先进制造技术信息网站!
首页 | 制造技术 | 制造设备 | 工业物联网 | 工业材料 | 设备保养维修 | 工业编程 |
home  MfgRobots >> 亿迅智能制造网 >  >> Manufacturing Technology >> 工业技术

PLCnext 集群管理:利用 Kubernetes 赋能工业自动化

作为 IT 领域多年标准,在工业界尚未产生大影响。常被视为过于复杂和不必要。问题在于:它们能带来优势吗?

以 Kubernetes 为例展望 PLCnext 的愿景。

Kubernetes

Kubernetes 是编排器(管理系统、主节点),除其他外利用容器在各设备间形成网络。系统以略微不同方式提供应用。

传统方式应用分发维护在设备上。知晓应用运行在哪台计算机。若应用需在另一计算机运行须人工操作。若一台计算机故障,其所有应用不可用。

使用 Kubernetes,向主节点给出应用状态描述,主节点处理其余。确保始终维持请求状态。但不知应用当前运行在哪节点,原则上仍可访问。

问答

什么是状态描述

如何安装集群

如何更新应用

节点故障会怎样

主节点故障会怎样

某些应用需在特定节点运行因需硬件访问

PLCnext 集群管理:利用 Kubernetes 赋能工业自动化 PLCnext 集群管理:利用 Kubernetes 赋能工业自动化

示例

由三容器 (frontend、backend、database) 组成应用的状态描述示例。

Deployment:

Service:

Ingress:

# Kind of the Deployment kind: Deployment apiVersion: apps/v1 metadata: name: MyApplicationName labels: app: MyApplication MyApplication: MyApplicationName namespace: default ## Container specs spec: containers: ## Container spec for Frontend ## Name for the Container - name: MyContainer-frontend ## Container Image to use image: MyApplicationImage_frontend ## Ports for the frontend, http ports: - containerPort: 80 ## Container spec for Backend - name: MyContainerName-backend image: MyApplicationImage_backend ports: - containerPort: 3000 ## Container spec for mongodb - name: MyContainerName-mongo image: mongo:3.4 ## Startup commands for Mongo DB command: - "mongod" - "--bind_ip" - "0.0.0.0" ports: - containerPort: 27017 --- ## Service declaration, expose Ports to the kubernetes api (only internal rechable) apiVersion: v1 kind: Service metadata: name: MyApplicationName spec: ports: - name: frontend targetPort: 80 port: 80 - name: backend targetPort: 3000 port: 3000 selector: app: MyApplication task: MyApplicationName --- ## Ingress declaration, bind proxy to fronted and backend apiVersion: networking.k8s.io/v1beta1 kind: Ingress ## Bind ingress to traefik service proxy metadata: name:MyApplicationName annotations: kubernetes.io/ingress.class: traefik ## Ingress class for frontend, map dns ingress to service port 80 spec: rules: - host: MyApp.Mydomain.de http: paths: - path: / backend: serviceName:MyApplicationName servicePort: frontend ## Ingress class for backend, map dns ingress to service port 3000 - host: MyApplicationName.MyDomain.de http: paths: - path: /api backend: serviceName:MyApplicationName servicePort: backend

了解更多

https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/
https://github.com/k3s-io/k3s
https://github.com/rancher/k3d
https://github.com/inercia/k3x


工业技术

  1. 冲压工艺全解析:类型、流程与工业应用
  2. 摩擦焊详解:原理、工艺分类与工业应用全景
  3. 热喷涂技术详解:工艺分类、应用场景与核心优势
  4. 水玻璃在铸造生产中的增效提质应用技术全解析
  5. 用Linux终端命令在PLCnext Control上快速配置VLAN
  6. 在PLCnext设备上用grpcurl安全远程访问gRPC
  7. PLCnext CLI 模板:简化 C++ 开发流程
  8. 安全访问通过 DHCP 获取 IP 的 PLCnext Web 服务器
  9. 开发 PLCnext 控制台应用 (C#):初学者指南
  10. 基于 Tableau 打造 PLCnext 实时监控仪表板
  11. 从 PLCnext 云数据创建 Power BI 仪表板
  12. 在 Azure IoT Hub 中为 PLCnext Control 构建实时 Grafana 仪表板