k8s
Docker常用操作
Docker推送本地镜像到内网Harbor
Harbor 部署
使用kk部署kubesphere
kubernetes 挂载 configMap 中的单个文件
Jenkins
使用Docker部署Apt-Cacher-ng服务
序列图
kubernetes拉取内网Harbor中的私有镜像
rook-ceph 使用常见问题
ingress-nginx 安装与使用
gitlab ubuntu 安装文档
gitlab runner 相关问题
minio 常用操作
202304代办列表
redis 常用操作
curve 常用操作
kubeadm搭建k8s集群
如何将 kubeadm init 需要的镜像离线到本地 Harbor
前置依赖安装
podman非根用户容器开机自启
本文档使用 MrDoc 发布
-
+
home page
使用kk部署kubesphere
``` # 安装依赖 apt install conntrack socat iptables ipset ipvsadm chrony ebtables docker.io ``` ``` sudo vim /etc/docker/daemon.json { "log-opts": { "max-size": "5m", "max-file":"3" }, "exec-opts": ["native.cgroupdriver=systemd"], "registry-mirrors": [ "http://10.10.140.105:80", "https://ung2thfc.mirror.aliyuncs.com/", "https://docker.mirrors.ustc.edu.cn", "http://hub-mirror.c.163.com" ], "insecure-registries":[ "10.10.140.105:80" ] } sudo systemctl daemon-reload sudo systemctl restart docker ``` https://kubesphere.io/zh/docs/v3.3/installing-on-linux/introduction/multioverview/ ``` export KKZONE=cn curl -sfL https://get-kk.kubesphere.io | VERSION=v2.2.2 sh - chmod +x kk ./kk create config --with-kubernetes v1.22.x --with-kubesphere 3.3.0 ./kk create cluster -f config-sample.yaml ``` ``` ##################################################### ### Welcome to KubeSphere! ### ##################################################### Console: http://10.10.140.111:30880 Account: admin Password: P@88w0rd NOTES: 1. After you log into the console, please check the monitoring status of service components in "Cluster Management". If any service is not ready, please wait patiently until all components are up and running. 2. Please change the default password after login. ##################################################### https://kubesphere.io 2022-10-19 13:31:47 ##################################################### 13:33:47 UTC success: [node1] 13:33:47 UTC Pipeline[CreateClusterPipeline] execute successfully Installation is complete. Please check the result using the command: kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l 'app in (ks-install, ks-installer)' -o jsonpath='{.items[0].metadata.name}') -f ``` ``` - registry.cn-beijing.aliyuncs.com/kubesphereio/tomcat85-java8-centos7:v3.2.0 - registry.cn-beijing.aliyuncs.com/kubesphereio/tomcat85-java8-runtime:v3.2.0 - registry.cn-beijing.aliyuncs.com/kubesphereio/java-11-centos7:v3.2.0 - registry.cn-beijing.aliyuncs.com/kubesphereio/java-8-centos7:v3.2.0 - registry.cn-beijing.aliyuncs.com/kubesphereio/java-8-runtime:v3.2.0 - registry.cn-beijing.aliyuncs.com/kubesphereio/java-11-runtime:v3.2.0 ``` https://kubesphere.io/blogs/guide-to-kubernetes-ingress-controllers/ ``` # 通过 YAML 清单安装ingress-nginx: kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.1.1/deploy/static/provider/cloud/deploy.yaml # 查看pods kubectl get pods --all-namespaces # 查看docker daemon 日志 journalctl -fu docker.service # 查看kubelet 日志 journalctl -fu kubelet.service # 查看deployments kubectl get deployments --all-namespaces # 进入pod容器 kubectl exec -it -n pypa dodo-server-v1-6bcf9979cd-7wfwv /bin/bash # 重启工作负载 kubectl rollout restart deployment <deployment_name> -n <namespace> ``` ### 报错 dbus: connection closed by user ``` unable to ensure pod container exists: failed to create container for [...] dbus: connection closed by user ``` node节点出现 `dbus:connection closed by user` 问题是因为 `kubelet` 调 `/var/run/dbus/system_bus_socket` 这个socket发现连接被关闭导致的。 当dbus服务由于某些异常发生重启, `/var/run/dbus/system_bus_socket` 文件就会被重新创建,旧的socket文件会被删除,因此kubelet再往旧的socket发送数据,就会出现连接被关闭的报错。 解决方法:重启kubelet,服务就可以重新和新的dbus socket建立连接。查看Pod状态也正常了。 ``` # 编辑配置 kubectl edit -n kubesphere-devops-system deployments.apps devops-jenkins ``` ## 报错 IPVS no destination available ## 在线终端打开报错 [nginx 开启 websocket](https://v-ta.com/doc/155/ "nginx 开启 websocket")
幻翼
Dec. 2, 2022, 2:33 p.m.
转发文档
Collection documents
Last
Next
手机扫码
Copy link
手机扫一扫转发分享
Copy link
Markdown文件
share
link
type
password
Update password