上一页 1 2 3 4 5 6 7 8 ··· 11 下一页
摘要: pv apiVersion: v1 kind: PersistentVolume metadata: name: my-pv spec: capacity: storage: 5Gi accessModes: - ReadWriteMany nfs: path: /data/nfs server: 阅读全文
posted @ 2020-12-15 16:09 Richardo-M-Lu 阅读(1665) 评论(0) 推荐(0) 编辑
摘要: service apiVersion: v1 kind: Service metadata: creationTimestamp: null labels: app: nginx name: nginx1 spec: ports: - port: 80 protocol: TCP targetPor 阅读全文
posted @ 2020-12-15 15:13 Richardo-M-Lu 阅读(602) 评论(0) 推荐(0) 编辑
摘要: job apiVersion: batch/v1 kind: Job metadata: creationTimestamp: null name: pi spec: template: metadata: creationTimestamp: null spec: containers: - im 阅读全文
posted @ 2020-12-15 15:02 Richardo-M-Lu 阅读(615) 评论(0) 推荐(0) 编辑
摘要: deployments apiVersion: apps/v1 kind: Deployment metadata: creationTimestamp: null labels: app: nginx name: nginx spec: replicas: 1 selector: matchLab 阅读全文
posted @ 2020-12-15 14:58 Richardo-M-Lu 阅读(212) 评论(0) 推荐(0) 编辑
摘要: # 配置国内的镜像源: ## centos cp -a /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak wget -O /etc/yum.repos.d/CentOS-Base.repo https:// 阅读全文
posted @ 2020-12-09 17:38 Richardo-M-Lu 阅读(69) 评论(0) 推荐(0) 编辑
摘要: kubectl get nodes kubectl get nodes -o wide kubectl get pods -o wide kubectl get pod,svc kubectl get nodes kubectl get node kubectl get no kubectl get 阅读全文
posted @ 2020-12-09 17:16 Richardo-M-Lu 阅读(204) 评论(0) 推荐(0) 编辑
摘要: ####摘要 为了实现将要共享的数据放在volume container中实现在不同主机间的数据共享,我们使用dockerfile构建容器时报错标题中所示 ####解决步骤 1、报错如下图: 2、报错的大概意思是不能在已存在的文件上构建卷,由上图可知htdocs是一个文件,因此将该文件换成目录,内容 阅读全文
posted @ 2020-11-25 08:59 Richardo-M-Lu 阅读(1398) 评论(1) 推荐(0) 编辑
摘要: 1、block-io的限制范围? Block IO 是另一种可以限制容器使用的资源。Block IO 指的是磁盘的读写,docker 可通过设置权重、限制 bps 和 iops 的方式控制容器读写磁盘的带宽 注:目前 Block IO 限额只对 direct IO(不使用文件缓存)有效。 2、如何进 阅读全文
posted @ 2020-11-20 11:34 Richardo-M-Lu 阅读(353) 评论(0) 推荐(0) 编辑
摘要: 1、容器如何对CPU进行限制? 默认设置下,所有容器可以平等地使用 host CPU 资源并且没有限制。 Docker 可以通过 -c 或 --cpu-shares 设置容器使用 CPU 的权重。如果不指定,默认值为 1024。 与内存限额不同,通过 -c 设置的 cpu share 并不是 CPU 阅读全文
posted @ 2020-11-20 11:06 Richardo-M-Lu 阅读(876) 评论(0) 推荐(0) 编辑
摘要: 1、为什么要限制内存? 一个 docker host 上会运行若干容器,每个容器都需要 CPU、内存和 IO 资源。对于 KVM,VMware 等虚拟化技术,用户可以控制分配多少 CPU、内存资源给每个虚拟机。对于容器,Docker 也提供了类似的机制避免某个容器因占用太多资源而影响其他容器乃至整个 阅读全文
posted @ 2020-11-20 10:49 Richardo-M-Lu 阅读(1471) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 11 下一页