feedcode

feedcode

V2EX 第 508373 号会员,加入于 2020-09-16 16:13:14 +08:00
今日活跃度排名 1183
根据 feedcode 的设置,主题列表被隐藏
二手交易 相关的信息,包括已关闭的交易,不会被隐藏
feedcode 最近回复了
1 天前
回复了 fitme 创建的主题 Kubernetes k8s 下 nfs-provisioner 迁移
删掉 PV 后重建,记得 spec.claimRef 保持和之前的一样,PVC 会重新 Bound

while read share;do
echo "check $share"
kubectl get pv $share -o yaml > "$share-origin.yaml"
ns=$(yq '.spec.claimRef.namespace' "$share-origin.yaml")
pvc=$(yq '.spec.claimRef.name' "$share-origin.yaml")
echo "$ns $pvc"
if [ ! -f "all-pods-$ns.yaml" ] ;then
kubectl get pods -n $ns -o yaml > "all-pods-$ns.yaml"
fi
podname=$(yq ".items[]|select(.spec.volumes[].persistentVolumeClaim.claimName==\"$pvc\")|.metadata.name" "all-pods-$ns.yaml")
echo "pods $podname will be deleted"
# patch pv
kubectl patch pv $share -p '{"spec":{"persistentVolumeReclaimPolicy":"Retain"}, "metadata":{"finalizers":null }}' --type=merge
kubectl delete pv $share --wait=false
sleep 5
kubectl delete pod -n $ns $podname
sleep 10
kubectl get pv $share || echo deleted
# recreate PV here
sed -e "REPLACE-HERE" "$share-origin.yaml" >"$share-new.yaml"
kubectl create -f "$share-new.yaml"
done<pv-shares.txt
13 天前
回复了 isxzlhhh 创建的主题 DevOps 使用 containerd 配置镜像加速不生效问题
ctr 不走 containerd 的 plugin 配置,plugins."io.containerd.grpc.v1.cri".registry 对 ctr 无用

The ctr utility is a command-line interface for directly interacting with the containerd daemon. It uses containerd's native API, not the CRI plugin's API. Therefore, when you use ctr image pull, it does not consult the registry mirror configurations set up for the CRI plugin.
42 天前
回复了 kyonn 创建的主题 NGINX 问个 nginx 配置问题
你如果认为这里应该是或的关系,那改成|就行了
42 天前
回复了 kyonn 创建的主题 NGINX 问个 nginx 配置问题
(?x) 这个表示 Free-Spacing , 后面的空格和换行会 ignore
https://www.regular-expressions.info/freespacing.html
59 天前
回复了 BlAckzkl 创建的主题 生活 胃痉挛
胃痉挛疼的厉害的时候一滴水都喝不下,只能打阿托品舒缓平滑肌
> 需要疯狂重启,才有机会点亮
这个试试关掉 UEFI 里的 fast boot 试试,fast boot 打开的时候关机不会重置硬件的状态
91 天前
回复了 cxhello 创建的主题 Kubernetes k8s 使用调研
如果运维有能力和时间的当然自建。举个例子,k8s 升级后发现新的版本有问题,想回退到上一个版本,很多云上都不支持,自建的话就灵活许多
107 天前
回复了 SeaSaltPepper 创建的主题 Linux Linux 如何找出本地 DNS 请求来源
# ptcpdump is a tcpdump-compatible packet analyzer powered by eBPF, automatically annotating packets with process/container/pod metadata when detectable.
https://github.com/mozillazg/ptcpdump
# audit
auditctl -a exit,always -F arch=b64 -S connect -k "connect-audit"
110 天前
回复了 pudgedoor 创建的主题 健康 有 v 友有颞下颌关节紊乱的问题吗
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3228 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 11ms · UTC 10:36 · PVG 18:36 · LAX 03:36 · JFK 06:36
Developed with CodeLauncher
♥ Do have faith in what you're doing.