本站用于记录日常工作内容,虚拟化云计算,系统运维,数据库DBA,网络与安全。
问题描述:  为了节省创建deployment的时间,提前在Node本地拉取了镜像,但是deployment在创建pod时,总是报错:can't pull image  这个错误表明,pod在创建的时候还是会去pull镜像,无论本地是否已经存在此镜像。解决方案:  通过检查deployment的yaml文件,发现 imagePullPolicy 为“Always”(默认值),修改为“IfNotPresent”或是 "Never"即可解决此问题。
Kubernet(K8s)集群安装和检查 附件是K8S 1.15.4 HA安装手册 一、组件方式检查1. Master节点:root>> kubectl get cs2. Node 节点:无  二、服务方式检查1. Master 节点:root>> systemctl status etcdroot>> systemctl status kube-apiserverroot>> systemctl status kube-controller-managerroot>> systemctl status kube-scheduler  2. Node 节点root>> systemctl status flanneldroot>> systemctl status kube-proxyroot>> systemctl status kubeletroot>> systemctl status docker  三、进程方式检查1. Master 节点:root>> ps -ef | grep etcdroot>> yum list installed | grep kube  2. Node 节点:root>> ps -ef | grep flannelroot>> ps -ef | grep kube   四、安装包方式检查1. Master 节点:root>> yum list installed | grep etcdroot>> yum list installed | grep kube  2. Node 节点:root>> yum list installed | grep fl...
WebVirtMgr 基于Centos7.3的KVM虚拟化管理平台安装KVM是centos下面的虚拟机,是一个比较好用的一种虚拟化技术,但是通常来说服务器跑Centos很少会安装图形界面,使用命令来管理虚拟机也是比较麻烦的,所以有一种web的虚拟化管理平台就很方便了。安装环境,Centos7.3,硬件Dell R710,3块1TB硬盘做阵列5安装KVM部分1、首先,对服务器Bios开启虚拟化支持,然后,查看服务器CPU是否支持虚拟化,一般服务器都会支持,可以看到是支持的[root@localhost ~]# egrep '(svm|vmx)' /proc/cpuinfo2、关闭Selinux,设置selinux=disabled[root@localhost ~]# vim /etc/selinux/config# This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=disabled # SELINUXTYPE= can take one of three two values: # targeted - Targeted processes are protected, # minimum - Modification of targeted policy. Only selected processes ar...
您所在的组无权查看该日志
docker 使用网络以及容器互联 [root@docker01 /]# docker run -d -p 9999:5000 --name web training/webapp####小p ,容器的5000端口随机映射到宿主机的9999端口78068be818e2bb7917c97363ce2e6bc5cf1ebeb1741ff6594b2ee1e352afd07c [root@docker01 /]# docker ps -l CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 78068be818e2 training/webapp "python app.py" 14 seconds ago Up 13 seconds 0.0.0.0:9999->5000/tcp web [root@docker01 /]# docker port web 5000/tcp -> 0.0.0.0:9999[root@docker01 /]# docker run -d -P --name web training/webapp ####大p ,容器的5000端口随机映射到宿主机的随机端口 1ad2b424f6bf74a2140111a3b581ed10975bfc1bd8b8f24a24c3763e4169e60f [root@docker01 /]# docker port web 5000/tcp -> 0.0.0.0:32778 [root@docker01 /]# docker ps -l CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 1ad2b424f6bf training/webap...
Podman  - 下一代Linux容器工具                 podman是一个用于处理容器的开源Linux工具。 包括注册表中的容器,例如docker.io和quay.io. 在本文中,将展示如何使用podman构建容器映像并从中创建容器。 接下来,我展示如何将图像上传到注册表,最后,展示如何使用docker在非Linux系统上使用podman创建的完全兼容的图像创建容器。     开始之前,快速了解项目名称及徽标。 像展示的那样,podman可以使用容器,但也适用于在同一主机上一起部署的容器,容器组。 (如果了解Kubernetes,就会熟悉podman的工作原理。)重要的是,一组海豹被称为豆荚,因为上面有令人敬畏的豆荚标志。 不会在这里讨论pods,的确它是该工具的一个很棒的功能。足够的背景,让我们继续前进。这里使用的是reshot linux第一步是安装podman。 像往常一样,明智的第一步是运行更新,以获得良好的系统:$ sudo dnf -y update 在系统是最新时,继续安装podman:$ sudo dnf -y install podman使用yum或apt-get来安装和管理软件。准备podman,可使用别名docker = podman。 这意味着Li...
 
0

k8s日志收集实战

发表者:admin分类:云计算容器2019-10-14 16:54:21 阅读[911]
k8s日志收集实战 简介本文主要介绍在k8s中收集应用的日志方案,应用运行中日志,一般情况下都需要收集存储到一个集中的日志管理系统中,可以方便对日志进行分析统计,监控,甚至用于机器学习,智能分析应用系统问题,及时修复应用所存在的问题。在k8s集群中应用一般有如下日志输出方式直接遵循docker官方建议把日志输出到标准输出或者标准错误输出输出日志到容器内指定目录中应用直接发送日志给日志收集系统本文会综合部署上述日志收集方案。日志收集组件说明elastisearch 存储收集到的日志kibana 可视化收集到的日志logstash 汇总处理日志发送给elastisearch 存储filebeat 读取容器或者应用日志文件处理发送给elastisearch或者logstash,也可用于汇总日志fluentd 读取容器或者应用日志文件处理发送给elastisearch,也可用于汇总日志fluent-bit 读取容器或者应用日志文件处理发送给elastisearch或者fluentd部署本次实验使用了3台虚拟机做k8s集群,每台虚拟机3G内存部署前的准备# 拉取文件 git clone https://github.com/mgxian/k8s-log.git cd k8s-log git checkout v1 # 创建 logging namespace kubectl apply&nb...
使用k8s创建容器一直处于ContainerCreating状态             容器报错信息为(两种): FailedSynError syncing pod, skipping: failed to "StartContainer" for "POD" with ErrImagePull: "image pull failed for registry.access.redhat.com/rhel7/pod-infrastructure:latest, this may be because there are no credentials on this request.  details: (open /etc/docker/certs.d/registry.access.redhat.com/redhat-ca.crt: no such file or directory)" 13m 11s 56 {kubelet 127.0.0.1} Warning FailedSync Error syncing pod, skipping: failed to "StartContainer" for "POD" with ImagePullBackOff: "Back-off pulling image \"registry.access.redhat.com/rhel7/pod-infrastruc...
主机ip地址:10.200.3.81系统版本:[root@localhost ~]# cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core)1、配置yum源:[root@localhost ~]# cat >/etc/yum.repos.d/kubernetes.repo<<-EOF [virt7-docker-common-release] name=virt7-docker-common-release baseurl=http://cbs.centos.org/repos/virt7-docker-common-release/x86_64/os/ gpgcheck=0 EOF 2、查看当前yum里的Kubernetes版本:[root@localhost ~]# yum info kubernetes Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: mirrors.shu.edu.cn * extras: ftp.tsukuba.wide.ad.jp * updates: mirrors.shu.edu.cn Installed Packages Name : kubernetes Arch : x86_64 Version : 1.5.2 Release : 0.7.git269f928.el7 Size : 0.0 Repo : installed From repo : extras Summary : Container cluster management URL : k8s.io/kubernetes License : ASL 2.0 Description : Container cluster management3、安装所需要的包:[root@localhost ~]# y...
 
0

Docker日常操作命令

发表者:admin分类:云计算容器2019-10-12 22:06:13 阅读[1045]
使用Docker已有一段时间了,今天正好有空梳理下自己平时操作Docker时的一些命令和注意细节:Docker 命令帮助$ sudo docker Commands: attach Attach to a running container --将终端依附到容器上 1> 运行一个交互型容器 [root@localhost ~]# docker run -i -t centos /bin/bash [root@f0a02b473067 /]# 2> 在另一个窗口上查看该容器的状态 [root@localhost ~]# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d4a75f165ce6 centos "/bin/bash" 5 seconds ago Up 5 seconds cranky_mahavira 3> 退出第一步中运行的容器 [root@d4a75f165ce6 /]# exit exit 4> 查看该容器的状态 [root@localhost ~]# docker ps -a CONTAINER ID IMAGE ...
    总共58页,当前第17页 | 页数:
  1. 7
  2. 8
  3. 9
  4. 10
  5. 11
  6. 12
  7. 13
  8. 14
  9. 15
  10. 16
  11. 17
  12. 18
  13. 19
  14. 20
  15. 21
  16. 22
  17. 23
  18. 24
  19. 25
  20. 26
  21. 27