文章分类 -  Kubernetes

Kubernetes
摘要:程序代码识别自签证书 背景: 由于客户采用自签证书 导致程序应用上传文件报错 1. 先尝试在容器pod 将证书复制到系统级证书存储库中 由于容器 Pod 是ubuntu系统 apt-get update apt-get install ca-certificates cp /tmp/ca.crt / 阅读全文
posted @ 2023-11-10 17:07 小星奕的快乐 阅读(44) 评论(0) 推荐(0)
摘要:# sealer安装报错合集 ## 1. ![image](https://img2023.cnblogs.com/blog/3030072/202308/3030072-20230806173441767-1983691010.png) 阅读全文
posted @ 2023-08-06 17:34 小星奕的快乐 阅读(10) 评论(0) 推荐(0)
摘要:# 背景: 在以往安装部署阶段客户域名都是采用80 443标准端口来实施,但有的客户不采用标准端口 而是9000 9443端口. ## 方案: 网络出去采用Nodeport形式 ## 1.修改nodeport端口范围 在 k8s 集群中,NodePort 默认范围是 30000-32767 所以需要 阅读全文
posted @ 2023-07-03 10:48 小星奕的快乐 阅读(127) 评论(0) 推荐(0)
摘要:# 1.K8S部署的Redis报错 *现象* ![image](https://img2023.cnblogs.com/blog/3030072/202306/3030072-20230626100906537-993990192.png) ![image](https://img2023.cnbl 阅读全文
posted @ 2023-06-26 10:11 小星奕的快乐 阅读(21) 评论(0) 推荐(0)
摘要:Minio备份 #!/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin . /etc/profile ## 备份时间戳 ## 备份类型 oss|hostPath token="KrAyu4Haquej 阅读全文
posted @ 2023-04-10 15:40 小星奕的快乐 阅读(473) 评论(0) 推荐(0)
摘要:编辑文件 cat /var/lib/kubelet/config.yaml | grep max 将128 调大点即可 重启Kubelet systemctl restart kubelet 阅读全文
posted @ 2023-03-14 15:05 小星奕的快乐 阅读(30) 评论(0) 推荐(0)
摘要:背景: 生产环境中 发现 ingress 三个POD 状态都有问题 POD 也是无法登陆进去的 查看日志很明显发现 有项目 ingress 配置有问题 有30个域名 但是无法定位到具体是哪个域名导致的 1.临时容器介绍: 当由于容器崩溃或容器镜像不包含调试工具而导致 kubectl exec 无用时 阅读全文
posted @ 2023-03-14 11:54 小星奕的快乐 阅读(311) 评论(0) 推荐(0)
摘要:K8S node节点起不来 节点提示 /var/log/message 解决办法 https://ost.51cto.com/posts/12469 $ mkdir -p /sys/fs/cgroup/cpu,cpuacct/kubelet.slice $ mkdir -p /sys/fs/cgro 阅读全文
posted @ 2023-02-08 17:40 小星奕的快乐 阅读(39) 评论(0) 推荐(0)
摘要:测试是否支持 curl -v --tlsv1.1 --tls-max 1.1 https://mip-atjs.fdcyun.com:9443/apigate/msg/bi2mip curl -v --tlsv1.1 --tls-max 1.2 https://mip-atjs.fdcyun.com 阅读全文
posted @ 2023-02-06 11:42 小星奕的快乐 阅读(9) 评论(0) 推荐(0)
摘要:#!/bin/bash date=`date +"%Y%m%d%H%M%S"` Backup_dir=/data/backup/rabbitmq # 企微相关配置 db_type="RabbitMQ" db_env="宜昌城发生产环境" host=$(hostname -I|awk '{print 阅读全文
posted @ 2023-01-28 09:34 小星奕的快乐 阅读(11) 评论(0) 推荐(0)
摘要:#!/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin . /etc/profile # webhook db_type="MongoDB" db_env="宜昌城发正式环境" webhook_url 阅读全文
posted @ 2023-01-28 09:33 小星奕的快乐 阅读(5) 评论(0) 推荐(0)
摘要:K8S安装etcd apiVersion: v1 kind: Service metadata: name: etcd-cluster spec: ports: - name: etcd-client-port port: 2379 protocol: TCP targetPort: 2379 se 阅读全文
posted @ 2023-01-09 14:15 小星奕的快乐 阅读(115) 评论(0) 推荐(0)
摘要:在实际生产中由于etcd对硬盘性能要求高 所以要求将etcd存储目录迁移到SSD磁盘中 1.格式化磁盘 格式化第一个sdb分区 将磁盘格式化成两个分区 fdisk /dev/sdb n p 回车 133000000(备注 用一半) wq 格式化第二个sdb分区 将磁盘格式化成两个分区 fdisk / 阅读全文
posted @ 2023-01-06 14:40 小星奕的快乐 阅读(362) 评论(0) 推荐(0)
摘要:K8S基础用法 1.K8S复制文件 1.1 将文件copy到K8S中 kubectl cp index.html nginx1-7-deployment-d567bcdc6-dv4xn:/usr/share/nginx/html -n ingress-nginx 1.2 将pod文件copy到本地 阅读全文
posted @ 2022-12-28 14:28 小星奕的快乐 阅读(434) 评论(0) 推荐(0)
摘要:NodePort 映射 kind: ConfigMap apiVersion: v1 metadata: name: nginx-config data: pzzx.conf: | server { listen 30761; index index.html index.htm index.php 阅读全文
posted @ 2022-12-27 17:37 小星奕的快乐 阅读(55) 评论(0) 推荐(0)
摘要:prometheus+grafana+alertmanager 监控系统 1. 创建命名空间以及SA账号 1.1 创建命名空间 kubectl create ns monitor-sa 2. 创建sa账号 kubectl create serviceaccount monitor -n monito 阅读全文
posted @ 2022-12-27 16:02 小星奕的快乐 阅读(237) 评论(0) 推荐(0)
摘要:1.现象 metrics-server 起不来 2.解决 kubectl edit deploy metrics-server -n kube-system 将Hostname 删除 阅读全文
posted @ 2022-12-15 10:48 小星奕的快乐 阅读(121) 评论(0) 推荐(0)
摘要:apiVersion: v1 kind: Service metadata: annotations: meta.helm.sh/release-name: mysql-externalname meta.helm.sh/release-namespace: default labels: app. 阅读全文
posted @ 2022-12-15 10:40 小星奕的快乐 阅读(76) 评论(0) 推荐(0)
摘要:脚本写法如下 #!/bin/bash kubectl get pod -A -o wide | grep node-3 > /root/pod.txt while read dy do podnamespace=`echo $dy|awk '{print $1}'` podname=`echo $d 阅读全文
posted @ 2022-12-15 10:34 小星奕的快乐 阅读(41) 评论(0) 推荐(0)
摘要:K8S常规用法 1. 标签 1. 标签是什么 标签是k8s特色的管理方式,便于分类管理资源对象。 一个标签可以对应多个资源,一个资源也可以有多个标签,它们是多对多的关系。 一个资源拥有多个标签,可以实现不同https://so.csdn.net/so/search?q=%E7%BB%B4%E5%BA 阅读全文
posted @ 2022-12-14 16:59 小星奕的快乐 阅读(155) 评论(0) 推荐(0)