摘要: 1.查看pod [root@k8s-master01 ~]# kubectl get pod NAME READY STATUS RESTARTS AGE web-0 1/1 Running 0 111m web-1 1/1 Running 0 112m web-2 1/1 Running 0 3m 阅读全文
posted @ 2021-02-11 17:28 等等马上就好 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 1.当前版本 [root@k8s-master01 ~]# kubectl get sts web -oyaml|grep image f:imagePullPolicy: {} f:image: {} - image: nginx:1.15.2 imagePullPolicy: IfNotPres 阅读全文
posted @ 2021-02-11 15:36 等等马上就好 阅读(565) 评论(0) 推荐(0) 编辑
摘要: 1.扩容 [root@k8s-master01 ~]# kubectl scale --replicas=3 deploy nginx deployment.apps/nginx scaled [root@k8s-master01 ~]# kubectl get po NAME READY STAT 阅读全文
posted @ 2021-02-06 23:31 等等马上就好 阅读(268) 评论(0) 推荐(0) 编辑
摘要: # Deployment 暂停功能 [root@k8s-master01 ~]# kubectl rollout pause deployment nginx deployment.apps/nginx paused [root@k8s-master01 ~]# kubectl set image 阅读全文
posted @ 2021-02-06 23:26 等等马上就好 阅读(1826) 评论(0) 推荐(0) 编辑
摘要: 1.查看当前镜像 [root@k8s-master01 ~]# kubectl get deploy nginx -oyaml|grep image kubernetes.io/change-cause: kubectl set image deploy nginx nginx=nginx:1.15 阅读全文
posted @ 2021-02-06 23:23 等等马上就好 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 1.查看镜像 [root@k8s-master01 ~]# kubectl get deploy -oyaml |grep image f:image: {} f:imagePullPolicy: {} - image: nginx:1.15.2 imagePullPolicy: IfNotPres 阅读全文
posted @ 2021-02-06 16:53 等等马上就好 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 1.Deployment概念 用于部署无状态的服务,这个最常用的控制器。一般用于管理维护企业内部无状态的微服务,比如configserver、zuul、springboot。他可以管理多个副本的Pod实现无缝迁移、自动扩容缩容、自动灾难恢复、一键回滚等功能。 2.创建一个Deployment 1.命 阅读全文
posted @ 2021-02-06 16:21 等等马上就好 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 1.yaml文件 [root@k8s-master01 ~]# cat -n pod.yaml # 新增第20行 1 apiVersion: v1 # 必选,API的版本号 2 kind: Pod # 必选,类型Pod 3 metadata: # 必选,元数据 4 name: nginx # 必选, 阅读全文
posted @ 2021-02-06 15:47 等等马上就好 阅读(806) 评论(0) 推荐(0) 编辑
摘要: 链接: https://zhuanlan.zhihu.com/p/113000105 可能是因为flannel没起来 coredns也不会起来的 阅读全文
posted @ 2021-02-06 14:28 等等马上就好 阅读(497) 评论(0) 推荐(0) 编辑
摘要: 问题如图 [root@k8s-master01 ~]# kubectl get po -n kube-system NAME READY STATUS RESTARTS AGE calico-kube-controllers-5f6d4b864b-5wxb9 1/1 Running 18 6d23h 阅读全文
posted @ 2021-02-06 13:37 等等马上就好 阅读(1026) 评论(0) 推荐(0) 编辑
摘要: [root@k8s-master01 ~]# cat pod.yaml 1 apiVersion: v1 # 必选,API的版本号 2 kind: Pod # 必选,类型Pod 3 metadata: # 必选,元数据 4 name: nginx # 必选,符合RFC 1035规范的Pod名称 5 阅读全文
posted @ 2021-02-04 23:06 等等马上就好 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 原:git clone https://github.com/jinzhu/inflection.git 新:git clone https://gitclone.com/github.com/jinzhu/inflection.git 有人发现报错没法拉取,那是因为git版本得是2.0以上。cen 阅读全文
posted @ 2021-02-04 11:05 等等马上就好 阅读(230) 评论(0) 推荐(0) 编辑
摘要: [root@k8s-master01 ~]# kubelet --version Kubernetes v1.20.0 问题: [root@k8s-master01 ~]# kubctl get node No resources found [root@k8s-master01 ~]# syste 阅读全文
posted @ 2021-01-30 10:29 等等马上就好 阅读(1642) 评论(0) 推荐(0) 编辑
摘要: 1.安装geoip ElasticSearch 可以使用 ingest-geoip 插件可以在 Kibana 上对 IP 进行地理位置分析, 这个插件需要 Maxmind 的 GeoLite2 City,GeoLite2 国家和 GeoLite2 ASN geoip2 数据库。有关更多详细信息,请参 阅读全文
posted @ 2020-08-22 15:34 等等马上就好 阅读(275) 评论(0) 推荐(0) 编辑
摘要: 1.收集多日志到ES 1)方式一: [root@web01 ~]# vim /etc/filebeat/filebeat.yml filebeat.inputs: - type: log enable: true paths: - /var/log/nginx/access.log json.key 阅读全文
posted @ 2020-08-22 15:31 等等马上就好 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 1.配置收集日志到logstash [root@web01 ~]# vim /etc/filebeat/filebeat.yml filebeat.inputs: - type: log enable: true paths: - /var/log/nginx/access.log json.key 阅读全文
posted @ 2020-08-22 15:29 等等马上就好 阅读(373) 评论(0) 推荐(0) 编辑
摘要: 1)配置 [root@web01 ~]# vim /etc/filebeat/filebeat.yml filebeat.inputs: - type: log enable: true paths: - /var/log/nginx/access.log json.keys_under_root: 阅读全文
posted @ 2020-08-22 15:28 等等马上就好 阅读(322) 评论(0) 推荐(0) 编辑
摘要: 1)配置 [root@web01 ~]# vim /etc/filebeat/filebeat.yml filebeat.inputs: - type: log enable: true paths: - /var/log/nginx/access.log json.keys_under_root: 阅读全文
posted @ 2020-08-22 15:26 等等马上就好 阅读(1466) 评论(0) 推荐(0) 编辑
摘要: 1.配置收集日志到文件 [root@web01 ~]# vim /etc/filebeat/filebeat.yml filebeat.inputs: - type: log enable: true paths: - /var/log/nginx/access.log output.file: p 阅读全文
posted @ 2020-08-22 15:25 等等马上就好 阅读(1618) 评论(0) 推荐(0) 编辑
摘要: 1.配置 filebeat.inputs: - type: log enable: true paths: - /var/log/nginx/access.log output.elasticsearch: hosts: ["10.0.0.51:9200"] 2.启动 [root@web01 ~]# 阅读全文
posted @ 2020-08-22 15:24 等等马上就好 阅读(2862) 评论(0) 推荐(0) 编辑