k8s pvc 扩容方法

本系列视频教程涵盖K8s的各种部署方式,包括minikube、kubeadm、kubeasz、rancher及k3s,并深入讲解核心资源如Pod、Service、Deployment的配置与使用。同时,课程提供helm命令详解与实践,以及K8s命令的源码分析,适合从入门到精通的学习需求。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

发布一个k8s部署视频:https://edu.csdn.net/course/detail/26967

课程内容:各种k8s部署方式。包括minikube部署,kubeadm部署,kubeasz部署,rancher部署,k3s部署。包括开发测试环境部署k8s,和生产环境部署k8s。

第二个视频发布  https://edu.csdn.net/course/detail/27109

介绍主要的k8s资源的使用配置和命令。包括configmap,pod,service,replicaset,namespace,deployment,daemonset,ingress,pv,pvc,sc,role,rolebinding,clusterrole,clusterrolebinding,secret,serviceaccount,statefulset,job,cronjob,podDisruptionbudget,podSecurityPolicy,networkPolicy,resourceQuota,limitrange,endpoint,event,conponentstatus,node,apiservice,controllerRevision等。

第三个视频发布:https://edu.csdn.net/course/detail/27574

详细介绍helm命令,学习helm chart语法,编写helm chart。深入分析各项目源码,学习编写helm插件

第四个课程发布:https://edu.csdn.net/course/detail/28488

本课程将详细介绍k8s所有命令,以及命令的go源码分析,学习知其然,知其所以然

————————————————

1storageclass 设置allowVolumeExpansion: true

如:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: rook-block
provisioner: rook.io/block
allowVolumeExpansion: true
parameters:
pool: replicapool
# Specify the namespace of the rook cluster from which to create volumes.
# If not specified, it will use `rook` as the default namespace of the cluster.
# This is also the namespace where the cluster will be
clusterNamespace: rook
# Specify the filesystem type of the volume. If not specified, it will use `ext4`.
# fstype: ext4

 

2编辑pvc增大容量

3扩展rdb

用rdb resize命令

如:

rbd resize --size 9192 pvc-6a06fa0f-c0a5-401b-83bf-d44c1dd20d80

扩展好后查看:

 rbd info --pool replicapool2 pvc-6a06fa0f-c0a5-401b-83bf-d44c1dd20d80   

4进入pod所在的主机

执行:resize2fs

如: resize2fs /dev/rbd1   

5进入pod,查看是否容量扩大

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

hxpjava1

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值