安装

官方:https://github.com/kubernetes-sigs/kube-batch

下载镜像

安装

官方:https://github.com/kubernetes-sigs/kube-batch

下载镜像

使用v0.5

docker pull kubesigs/kube-batch:v0.5

两种安装方式

  • 第一种:使用yaml安装
  • 第二种:使用helm安装

第一种:使用yaml 安装方式

【Step1】创建 CRD

kubectl create -f scheduling_v1alpha1_podgroup.yaml
kubectl create -f scheduling_v1alpha2_podgroup.yaml
kubectl create -f scheduling_v1alpha1_queue.yaml
kubectl create -f scheduling_v1alpha2_queue.yaml

scheduling_v1alpha1_podgroup.yaml

 apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: podgroups.scheduling.incubator.k8s.io
annotations:
"helm.sh/hook": "crd-install"
spec:
group: scheduling.incubator.k8s.io
names:
kind: PodGroup
plural: podgroups
scope: Namespaced
validation:
openAPIV3Schema:
properties:
apiVersion:
type: string
kind:
type: string
metadata:
type: object
spec:
properties:
minMember:
format: int32
type: integer
queue:
type: string
priorityClassName:
type: string
type: object
status:
properties:
succeeded:
format: int32
type: integer
failed:
format: int32
type: integer
running:
format: int32
type: integer
type: object
type: object
version: v1alpha1

scheduling_v1alpha2_podgroup.yaml

apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: podgroups.scheduling.sigs.dev
spec:
group: scheduling.sigs.dev
names:
kind: PodGroup
plural: podgroups
scope: Namespaced
validation:
openAPIV3Schema:
properties:
apiVersion:
type: string
kind:
type: string
metadata:
type: object
spec:
properties:
minMember:
format: int32
type: integer
queue:
type: string
priorityClassName:
type: string
type: object
status:
properties:
succeeded:
format: int32
type: integer
failed:
format: int32
type: integer
running:
format: int32
type: integer
type: object
type: object
version: v1alpha2

scheduling_v1alpha1_queue.yaml

apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: queues.scheduling.incubator.k8s.io
annotations:
"helm.sh/hook": "crd-install"
spec:
group: scheduling.incubator.k8s.io
names:
kind: Queue
plural: queues
scope: Cluster
validation:
openAPIV3Schema:
properties:
apiVersion:
type: string
kind:
type: string
metadata:
type: object
spec:
properties:
weight:
format: int32
type: integer
type: object
type: object
version: v1alpha1

scheduling_v1alpha2_queue.yaml

apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: queues.scheduling.sigs.dev
spec:
group: scheduling.sigs.dev
names:
kind: Queue
plural: queues
scope: Cluster
validation:
openAPIV3Schema:
properties:
apiVersion:
type: string
kind:
type: string
metadata:
type: object
spec:
properties:
weight:
format: int32
type: integer
type: object
status:
properties:
unknown:
format: int32
type: integer
pending:
format: int32
type: integer
running:
format: int32
type: integer
type: object
type: object
version: v1alpha2

【Step2】 创建deployment

kubectl create -f deployment.yaml

deployment.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
name: kube-batch
labels:
chart: kube-batch-kube-batch
spec:
replicas: 1
selector:
matchLabels:
app: kube-batch
template:
metadata:
labels:
app: kube-batch
spec:
containers:
- name: kube-batch
image: 10.220.54.6:8088/kuai/kube-batch:v0.5
args: ["--logtostderr", "--v", "3"]
imagePullPolicy: IfNotPresent
resources:
limits:
cpu: 2000m
memory: 2048Mi
requests:
cpu: 2000m
memory: 2048Mi

【Step3】创建Queue

apiVersion: scheduling.incubator.k8s.io/v1alpha1
kind: Queue
metadata:
name: default
spec:
weight: 1

第二种:使用helm 安装方式

【Step1】 下载kube-batch

#mkdir -p $GOPATH/src/github.com/kubernetes-sigs/

#cd $GOPATH/src/github.com/kubernetes-sigs/

#git clone http://github.com/kubernetes-sigs/kube-batch

【Step2】通过helm部署kube-batch

#helm install $GOPATH/src/github.com/kubernetes-sigs/kube-batch/deployment/kube-batch --namespace kube-system

【Step3】查看是否安装成功后

#helm list

使用v0.5

docker pull kubesigs/kube-batch:v0.5

两种安装方式

  • 第一种:使用yaml安装
  • 第二种:使用helm安装

第一种:使用yaml 安装方式

【Step1】创建 CRD

kubectl create -f scheduling_v1alpha1_podgroup.yaml
kubectl create -f scheduling_v1alpha2_podgroup.yaml
kubectl create -f scheduling_v1alpha1_queue.yaml
kubectl create -f scheduling_v1alpha2_queue.yaml

scheduling_v1alpha1_podgroup.yaml

 apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: podgroups.scheduling.incubator.k8s.io
annotations:
"helm.sh/hook": "crd-install"
spec:
group: scheduling.incubator.k8s.io
names:
kind: PodGroup
plural: podgroups
scope: Namespaced
validation:
openAPIV3Schema:
properties:
apiVersion:
type: string
kind:
type: string
metadata:
type: object
spec:
properties:
minMember:
format: int32
type: integer
queue:
type: string
priorityClassName:
type: string
type: object
status:
properties:
succeeded:
format: int32
type: integer
failed:
format: int32
type: integer
running:
format: int32
type: integer
type: object
type: object
version: v1alpha1

scheduling_v1alpha2_podgroup.yaml

apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: podgroups.scheduling.sigs.dev
spec:
group: scheduling.sigs.dev
names:
kind: PodGroup
plural: podgroups
scope: Namespaced
validation:
openAPIV3Schema:
properties:
apiVersion:
type: string
kind:
type: string
metadata:
type: object
spec:
properties:
minMember:
format: int32
type: integer
queue:
type: string
priorityClassName:
type: string
type: object
status:
properties:
succeeded:
format: int32
type: integer
failed:
format: int32
type: integer
running:
format: int32
type: integer
type: object
type: object
version: v1alpha2

scheduling_v1alpha1_queue.yaml

apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: queues.scheduling.incubator.k8s.io
annotations:
"helm.sh/hook": "crd-install"
spec:
group: scheduling.incubator.k8s.io
names:
kind: Queue
plural: queues
scope: Cluster
validation:
openAPIV3Schema:
properties:
apiVersion:
type: string
kind:
type: string
metadata:
type: object
spec:
properties:
weight:
format: int32
type: integer
type: object
type: object
version: v1alpha1

scheduling_v1alpha2_queue.yaml

apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: queues.scheduling.sigs.dev
spec:
group: scheduling.sigs.dev
names:
kind: Queue
plural: queues
scope: Cluster
validation:
openAPIV3Schema:
properties:
apiVersion:
type: string
kind:
type: string
metadata:
type: object
spec:
properties:
weight:
format: int32
type: integer
type: object
status:
properties:
unknown:
format: int32
type: integer
pending:
format: int32
type: integer
running:
format: int32
type: integer
type: object
type: object
version: v1alpha2

【Step2】 创建deployment

kubectl create -f deployment.yaml

deployment.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
name: kube-batch
labels:
chart: kube-batch-kube-batch
spec:
replicas: 1
selector:
matchLabels:
app: kube-batch
template:
metadata:
labels:
app: kube-batch
spec:
containers:
- name: kube-batch
image: 10.220.54.6:8088/kuai/kube-batch:v0.5
args: ["--logtostderr", "--v", "3"]
imagePullPolicy: IfNotPresent
resources:
limits:
cpu: 2000m
memory: 2048Mi
requests:
cpu: 2000m
memory: 2048Mi

【Step3】创建Queue

apiVersion: scheduling.incubator.k8s.io/v1alpha1
kind: Queue
metadata:
name: default
spec:
weight: 1

第二种:使用helm 安装方式

【Step1】 下载kube-batch

#mkdir -p $GOPATH/src/github.com/kubernetes-sigs/

#cd $GOPATH/src/github.com/kubernetes-sigs/

#git clone http://github.com/kubernetes-sigs/kube-batch

【Step2】通过helm部署kube-batch

#helm install $GOPATH/src/github.com/kubernetes-sigs/kube-batch/deployment/kube-batch --namespace kube-system

【Step3】查看是否安装成功后

#helm list

kube-batch(一)安装的更多相关文章

  1. Linux下的计划任务at,batch,crontab

    0x00前言: 继上次的windows计划任务后,拓展研究下linux下的计划任务,能够执行计划任务有3个命令at,batch,crontab 所谓的计划任务就是定时启动某个程序,可以是一组shell ...

  2. ltib安装过程中遇到好多问题,从网上转来的好多份总结

    最近调试MPC5125的板子,第一步LTIB都装不过去,挫败感十足. LTIB的安装镜像来自于freescale的ltib-mpc5121ads-200906,是用于Ubuntu 10版本之前的,现在 ...

  3. kubernetes kubeadm安装v1.14

    1.我们这里准备两台Centos7的主机用于安装,后续节点可以根究需要添加即可:master node01两台都得改:cat /etc/hosts192.168.71.134 master192.16 ...

  4. 安装ssh-batch工具

    关于sshbatch sshbatch是用perl写了非常方便操作管理集群的一个工具,项目的源码在GitHub托管. 关于sshbatch以及其详细的使用方法,春哥在GitHub上介绍的非常详细了,详 ...

  5. linux(centos8):kubeadm单机安装kubernetes(kubernetes 1.18.3)

    一,kubernetes安装的准备工作: 1,准备工作的各步骤请参见: https://www.cnblogs.com/architectforest/p/13141743.html   2,  ma ...

  6. 在Ubuntu安装kubernetes

    一.安装Docker 1. 配置Docker docker安装完成后需要配置cgroup驱动为systemd来增强稳定性 sudo vim /etc/docker/daemon.json { &quo ...

  7. 关于Kubernetes(简称K8S)的开启及基本使用,基于Docker Desktop & WSL2

    背景介绍 Kubernetes(简称k8s)已成为目前业界容器编排的事实标准,其搭配Docker可建立非常高效便捷的高可扩展.高可用应用服务架构. Kubernetes的名字来自希腊语,意思是&quo ...

  8. Windows2012中Jenkins搭建.NET自动编译测试与发布环境

    安装7Zip 下载地址: http://www.7-zip.org/a/7z1602-x64.exe 安装Git 下载地址:https://github.com/git-for-windows/git ...

  9. istio使用教程

    kubernetes各版本离线安装包 安装 安装k8s 强势插播广告 三步安装,不多说 安装helm, 推荐生产环境用helm安装,可以调参 release地址 如我使用的2.9.1版本 yum in ...

  10. 使用Kubeadm创建k8s集群之节点部署(三十一)

    前言 本篇部署教程将讲述k8s集群的节点(master和工作节点)部署,请先按照上一篇教程完成节点的准备.本篇教程中的操作全部使用脚本完成,并且对于某些情况(比如镜像拉取问题)还提供了多种解决方案.不 ...

随机推荐

  1. 死磕Spring之IoC篇 - BeanDefinition 的解析阶段(XML 文件)

    该系列文章是本人在学习 Spring 的过程中总结下来的,里面涉及到相关源码,可能对读者不太友好,请结合我的源码注释 Spring 源码分析 GitHub 地址 进行阅读 Spring 版本:5.1. ...

  2. linux文件权限的查看和修改(转)

    原文链接:https://www.cnblogs.com/sxdcgaq8080/p/7498906.html 命令: chmod 777 scan_record.js 格式: chmod 权限数字 ...

  3. 配置mysql数据库时出再错误:LookupError: No installed app with label 'admin'.

    版本: windows10+py37+django2.2 错误: 项目启动时出现,No installed app with label 'admin' 解决办法: 安装最新的 pip install ...

  4. Gradle 差异化构建

    Compile 默认的依赖方式,任何情况下都会依赖. Provided 只提供编译时依赖,打包时不会添加进去. Apk 只在打包Apk包时依赖,这个应该是比较少用到的. TestCompile 只在测 ...

  5. 第七届蓝桥杯JavaB组——第7题剪邮票

    题目: 剪邮票 如[图1.jpg], 有12张连在一起的12生肖的邮票. 现在你要从中剪下5张来,要求必须是连着的. (仅仅连接一个角不算相连) 比如,[图2.jpg],[图3.jpg]中,粉红色所示 ...

  6. Python 学习笔记(3)

    Python 文件I/O 读取键盘输入: Python提供了两个内置函数从标准输入读入一行文本,默认的标准输入是键盘: 1. raw_input #函数从标准输入读取一个行,并返回一个字符串(去掉结尾 ...

  7. Tango with django 1.9 中文——3.Django基础

    让我们开始运用Django.本章主要是给你一个关于创建新项目和新应用过程的概览.在本章的末尾,你将建立起一个简单的由Django驱动的网站. 3.1 配置测试 让我们测试以下你的Python和Djan ...

  8. pyinstaller打包exe运行失败

    使用Pyinstaller来打包自己开发的软件时遇到的几个问题及解决方法.工具主要功能是数据分析,使用机器学习算法完成数据训练和预测功能.主要用到了两个学习库keras和sklearn,所以说在打包时 ...

  9. 网络地址转换NAT的两种模式(概念浅析)& IP溯源

    由于全球IPv4地址越来越少.越来越贵,因此大到一个组织,小到一个家庭一个人都很难获得公网IP地址,所以只能使用内网地址,从而和别人共享一个公网IP地址.在这种情况下,NAT技术诞生. 翻译 NAT( ...

  10. Jmeter性能常见问题集锦

    1. java.net.BindException: Address already in use: connect 开始以为是单机运行脚本运行不过来,所以另加了一台负载机同时运行脚本 分布式环境部署 ...