microk8s和k3s
MicroK8s与K3s都是基于Kubernetes的轻量级发行版,主要面向工作站、边缘计算、物联网等应用场景,但二者也有比较大的区别。 主要区别 MicroK8s主要将一些扩展件集成到系统中,而K3s却将很多扩展件独立出来。 虽然MicroK8s与K3s都能支持ARM体系的低功耗计算,但是MicroK8s主打使用方便性,也更适合开发团队使用,而K3s主打轻量化,更适合低功耗的小型化无人值守的自动化系统使用。 MicroK8s的集群管理内核与Kubernetes标准版的容器镜像是完全一样的,而K3s的内核进行了一些修改,部分模块可能由于兼容性问题无法运...
关于JS中this的指向,这里有讲得比较清楚的,收藏一下
JS中this关键字很常见,但是它似乎变幻莫测,让人抓狂。这篇文章就来揭示其中的奥秘。 借助阮一峰老师的话:它代表函数运行时,自动生成的一个内部对象,只能在函数内部使用。这句话看似平常,可是要非常注意三个字:“运行时”,这说明this关键字只与函数的执行环境有关,而与声明环境没有关系。也就是这个this到底代表的是什么对象要等到函数运行时才知道,有点类似函数定义时的参数列表只在函数调用时才传入真正的对象。理解了这一点对后面this关键字规律的掌握有很大帮助。 this关键字虽然会根据环境变化,但是...
python常用(1)
# encoding: utf-8 from openpyxl.reader.excel import load_workbook # FOR xlsx import os import openpyxl from decimal import Decimal import shutil import zipfile path = os.getcwd() testplan = path + "\\testplan.xlsx" mapping_path = os.path.join(path, "MUT_Product_Mapping.xlsx") #print(mapping_path) workbook = load_workbook(mapping_path) worksheet = workbook.worksheets[0] mapping = {} for index, item in enumerate(worksheet.rows): # START with age row ...
k8s之Service
kind: Service apiVersion: v1 metadata: name: mysql-svc namespace: default labels: name: mysql-svc spec: ports: - name: http protocol: TCP port: 3306 targetPort: 3306 nodePort: 33306 selector: name: mysql-pod type: NodePort
k8s之PersistentVolume&PersistentVolumeClaim
kind:PersistentVolume apiVersion: v1 metadata: name: mysql-pv spec: capacity: storage:1Gi hostPath: path:/home/work/share/mysql type:'' accessModes: -ReadWriteOnce claimRef: kind:PersistentVolumeClaim namespace:default name: mysql-pvc persistentVolumeReclaimPolicy:Retain volumeMode:Filesystem kind: PersistentVolumeClaim apiVersion: v1 metadata: name: mysql-pvc namespace: default labels: app: mysql-pvc spec: accessM...
k8s之ReplicationController
kind: ReplicationController apiVersion: v1 metadata: name: mysql-rc namespace: default uid: 946f2c6a-f7ac-4412-b3c9-3741fe668717 resourceVersion: '1299573' generation: 3 creationTimestamp: '2021-05-17T09:16:19Z' labels: name: mysql-rc spec: replicas: 1 selector: name: mysql-pod template: metadata: labels: name: mysql-pod spec: volumes: - name: mysql-storage persistentVolumeClaim: claimN...
k8s deployment with persistentVolume
kind: Deployment apiVersion: apps/v1 metadata: name: mut-deployment namespace: default labels: app: mut spec: replicas: 1 selector: matchLabels: app: mut template: metadata: labels: app: mut spec: volumes: - name: testcase-storage persistentVolumeClaim: claimName: mut-pvc containers: - name: mut image: 'mut:20210531' ports: - containerPort: 80...
k8s之java-deployment
kind: Deployment apiVersion: apps/v1 metadata: name: pejava-deployment namespace: default labels: app: pejava spec: replicas: 1 selector: matchLabels: app: pejava template: metadata: labels: app: pejava spec: volumes: - name: git-storage persistentVolumeClaim: claimName: pejava-pvc containers: - name: pejava image: 'pejava:20210611' ports: - c...
k8s之mongo-deployment
kind: Deployment apiVersion: apps/v1 metadata: name: mongo-deployment namespace: default labels: app: mongo spec: replicas: 1 selector: matchLabels: app: mongo template: metadata: labels: app: mongo spec: containers: - name: mongo image: mongo ports: - containerPort: 27017 protocol: TCP
pe-deployment
kind: Deployment apiVersion: apps/v1 metadata: name: pe-deployment namespace: default labels: app: pe spec: replicas: 1 selector: matchLabels: app: pe template: metadata: labels: app: pe spec: containers: - name: pe image: 'pe:20210531' ports: - containerPort: 3001 protocol: TCP