随笔分类 -  docker

docker
摘要:查找状态异常的pod kubectl get pod -A|grep Evicted|awk '{print "kubectl delete pod -n cattle-system "$2}' > aaaa.sh cat kubectl get pod -A|grep Terminating|aw 阅读全文
posted @ 2021-06-23 14:22 leechg 阅读(634) 评论(0) 推荐(0) 编辑
摘要:每次服务器重启,在docker中运行的jenkins中使用docker时遇到以下错误 failed to dial gRPC: cannot connect to the Docker daemon. Is 'docker daemon' running on this host?: dial un 阅读全文
posted @ 2021-01-22 15:45 leechg 阅读(967) 评论(0) 推荐(0) 编辑
摘要:# yaml格式的pod定义文件完整内容: apiVersion: v1 #必选,版本号,例如v1 kind: Pod #必选,Pod metadata: #必选,元数据 name: intellect1 #必选,Pod名称 namespace: app #必选,Pod所属的命名空间 labels: 阅读全文
posted @ 2021-01-20 17:07 leechg 阅读(107) 评论(0) 推荐(0) 编辑
摘要:修改了 kube-apiserver.yaml配置,后apiserver无法启动,执行kubectl 命令报错。 , The connection to the server 192.168.190.128:6443 was refused - did you specify the right h 阅读全文
posted @ 2020-12-29 17:31 leechg 阅读(1750) 评论(2) 推荐(0) 编辑
摘要:添加以下环境变量 ENV LANG C.UTF-8 ENV LC_ALL C.UTF-8 DockerFile 为 FROM java:8 ADD app-0.0.1-SNAPSHOT.jar /tmp/app-0.0.1-SNAPSHOT.jar VOLUME /tmp ENV LANG C.UT 阅读全文
posted @ 2020-10-26 10:50 leechg 阅读(1328) 评论(0) 推荐(0) 编辑
摘要:docker images|grep none|awk '{print $3}'|xargs docker rmi docker images|grep none|awk '{print $3}'|xargs docker rmi 阅读全文
posted @ 2020-09-01 19:13 leechg 阅读(402) 评论(0) 推荐(0) 编辑
摘要:docker images | grep none | awk '{print $3}' | xargs docker rmi 阅读全文
posted @ 2020-08-27 10:01 leechg 阅读(918) 评论(0) 推荐(0) 编辑
摘要:在docker中搭建Jenkins运行环境后,使用docker命令构建docker镜像,报以下错误 + docker build -f ../Dockerfile -t 192.168.190.126:5000/aa***:latest . time="2020-08-25T09:39:21Z" l 阅读全文
posted @ 2020-08-25 11:11 leechg 阅读(2805) 评论(0) 推荐(0) 编辑
摘要:rancher单节点kubernetes启动容器错误 0/1 nodes are available: 1 node(s) had taints that the pod didn't tolerate. 是由于默认的master节点不允许作为数据节点使用,需要修改master节点使之可以同时作为d 阅读全文
posted @ 2020-08-18 15:46 leechg 阅读(704) 评论(0) 推荐(0) 编辑
摘要:允许保存密码 ``` git config --global credential.helper store ``` 配置用户信息 ``` git config user.name "userName" git config user.email "email address" ``` 下载镜像 ` 阅读全文
posted @ 2020-08-18 14:00 leechg 阅读(146) 评论(0) 推荐(0) 编辑
摘要:docker 镜像启动后需要调整容器的配置,比如修改端口配置或者修改卷映射配置。 首先在docker服务器上找到对应的容器的目录 /var/lib/docker/containers/42c6fa8f4514050f2a4129207678f1cdd81d2335824e38f047bdc135a8 阅读全文
posted @ 2020-08-18 10:13 leechg 阅读(763) 评论(0) 推荐(0) 编辑
摘要:使用describe查看pod信息,出现以下事件 Back-off restarting failed container 使用kubectl logs 发现是网络不通 关闭防火墙后重新导入,导入成功 阅读全文
posted @ 2020-08-14 18:44 leechg 阅读(1754) 评论(0) 推荐(0) 编辑
摘要:docker pull registry:2.7.1 mkdir -p /var/docker/registry/data docker run -d -v /var/docker/registry/data:/var/lib/registry -p 5000:5000 --restart=alwa 阅读全文
posted @ 2020-08-14 09:30 leechg 阅读(453) 评论(0) 推荐(0) 编辑
摘要:在docker服务器上添加新的镜像后想在rancher中部署运行,通过docker image ls可以看到镜像存在,但是在通过rancher添加部署的时候却出现以下错误。 Failed to pull image "data-center-catalog:latest": rpc error: c 阅读全文
posted @ 2020-08-10 15:34 leechg 阅读(2370) 评论(0) 推荐(0) 编辑
摘要:1 打包springboot项目 生成 data-center-catalog-1.0-SNAPSHOT.jar 2 配置dockerfile Dockerfile FROM java:8 ADD data-center-catalog-1.0-SNAPSHOT.jar /tmp/data-cent 阅读全文
posted @ 2020-08-10 15:26 leechg 阅读(217) 评论(0) 推荐(0) 编辑
摘要:使用rancher运行镜像时报以下错误 0/1 nodes are available: 1 node(s) had taints that the pod didn't tolerate. 是因为默认kubernetes默认不让pod部署到master节点,但是我在测试环境只有一个节点也是mast 阅读全文
posted @ 2020-08-10 11:47 leechg 阅读(7422) 评论(0) 推荐(0) 编辑
摘要:注册k8s到rancher时 agent pods一直处于containercreating状态 cattle-system cattle-cluster-agent-5dfcdff98b-7b2br 0/1 ContainerCreating 0 13m <none> localhost.loca 阅读全文
posted @ 2020-08-10 10:54 leechg 阅读(991) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示