01 2020 档案
摘要:结构图(提交规划好虚拟vip地址) 1、Nginx主备配置(4层复制)在http外面加一个stream stream { log_format main '$remote_addr $upstream_addr - [$time_local] $status $upstream_bytes_sent
阅读全文
摘要:1、配置 Deployment,将里面的对应的参数替换成我们自己的 nfs 配置(nfs-client.yaml) kind: Deployment apiVersion: extensions/v1beta1 metadata: name: nfs-client-provisioner spec:
阅读全文
摘要:创建pvc之前还要把nfs客户端装上 1、创建pvc cat pv2-nfs.yaml apiVersion: v1 kind: PersistentVolume metadata: name: pv2-nfs labels: app: nfs spec: capacity: storage: 2G
阅读全文
摘要:基础概念就不总结了,直接搞起 1、安装 1、关闭防火墙 systemctl stop firewalld.service systemctl disable firewalld.service 2、安装配置 nfs yum -y install nfs-utils rpcbind 3、配置 nfs,
阅读全文
摘要:1、kubectl describe pod tomcat-ccbc756f6-bh6wg #查看信息如下报错 2、在node节点 [root@linux-node2 ~]# cat .docker/config.json |base64 -w 0 ewoJImF1dGhzIjogewoJCSIxO
阅读全文
摘要:node ("docker") 自定义节点 系统管理--> 节点管理 一、模板 # credentialsId 账号密码id 凭据中查看添加 # url gitlab地址 node ("docker") { // 指定Slave标签 // 拉取代码 stage('Git Checkout') { c
阅读全文
摘要:swapoff -a # will turn off the swap kubeadm reset systemctl daemon-reload systemctl restart kubelet iptables -F && iptables -t nat -F && iptables -t m
阅读全文
摘要:1、模拟安装httpd 1 [root@linux-node1 ansible]# tree roles/ 2 roles/ 3 ├── app 4 │ ├── files 5 │ │ └── vhosts.conf 6 │ ├── handlers 7 │ │ └── main.yml 8 │ ├
阅读全文
摘要:1、在模拟一个http的role 1 [root@linux-node1 ansible]# cat httpd_role.yml 2 - hosts: date 3 remote_user: root 4 5 roles: 6 - httpd 7 [root@linux-node1 tasks]#
阅读全文
摘要:1、roles:角色的集合 1 [root@linux-node1 ~]# tree ansible/ 2 ansible/ 3 ├── nginx_roule.yml 4 └── roles 5 ├── httpd 6 ├── memcache 7 ├── mysql 8 └── nginx 9
阅读全文
摘要:1、for循环简单应用 [root@linux-node1 ansible]# cat testfor.yaml - hosts: date remote_user: root vars: ports: - 81 - 82 - 83 tasks: - name: copy conf template
阅读全文
摘要:1、基本使用 [root@linux-node1 ansible]# cat testitem.yaml - hosts: date remote_user: root tasks: - name: create some files file: name=/data1/{{ item }} sta
阅读全文
摘要:1、模拟6和7系统(6对应11、7对应12) [root@linux-node1 ansible]# cat test_template2.yaml - hosts: date remote_user: root vars: - http_port: 99 tasks: - name: instal
阅读全文
摘要:一、在剧本的当前目录创建templates文件夹(template只能在剧本使用) 二、例子 2.1 [root@linux-node1 ansible]# cat test_template.yaml - hosts: date remote_user: root tasks: - name: i
阅读全文