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

PLCnext 上的集群管理?

多年来,它一直是 IT 行业的标准,但尚未对行业产生太大影响。这些技术通常被视为
太复杂和不必要。随之而来的问题是,它们能给我们带来优势吗?

以 Kubernetes 为例对 PLCnext 的愿景。

Kubernetes

Kubernetes 是一个编排器(管理系统,主控系统),它使用容器等,从而通过各种设备形成网络。该系统用于以稍微不同的方式提供应用程序。

经典应用程序将在设备上分发和维护。知道应用程序在哪台计算机上运行。如果应用程序应该在另一台计算机上运行,​​则必须由人来完成。如果其中一台计算机出现故障,则该计算机的所有应用程序都将不再可用。

在 Kubernetes 中,master 获得了应用程序的状态描述,master 负责其余的工作。它确保始终保持请求的状态。不过目前不知道应用在哪个节点上运行,但原则上是可以访问的。

问答

什么痛惜条件描述

如何安装集群

如何执行应用程序的更新

如果一个节点发生故障会发生什么

如果 master 失败了会发生什么

某些应用程序需要在某些节点上运行,因为需要访问硬件。

示例

由三个容器(前端、后端、数据库)组成的应用程序状态描述示例。

部署:

服务:

入口:

# 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. PLCnext Technology 中的 VLAN 设置
  6. 使用 grpcurl 的远程 gRPC
  7. PLCnext CLI 模板
  8. 通过 DHCP 访问 PlcNext 网络服务器
  9. 如何在 C# 中创建一个简单的 PLCnext 控制台应用程序
  10. PLCnext Tableau 仪表板
  11. PLCnext Power BI 报告
  12. PLCnext Grafana 仪表板