09 2019 档案

摘要:docker search corednsdocker pull xxx 拉取镜像(根据实际情况选择)docker tag xxx coredns/coredns:latestdocker tag coredns/coredns:latest 192.168.0.1:5000/coredns/cor 阅读全文
posted @ 2019-09-30 11:19 信方 编辑
摘要:kubectl create/delete -f xxx.yml kubectl get all -A kubectl get pods -o wide kubectl describe pods podname -n namespace kubectl logs podname -n namesp 阅读全文
posted @ 2019-09-30 11:12 信方 编辑
摘要:docker pull registry docker run -d -v /data/registry:/var/lib/registry -p 5000:5000 --restart=always --privileged=true --name registry registry:latest docker pull mysql docker tag mysql:latest 192.... 阅读全文
posted @ 2019-09-30 11:10 信方 编辑
摘要:FROM 代表基于哪个镜像 RUN 安装软件使用 MAINTAINER 镜像的创建者 CMD 容器启动时执行的命令,但是一个Dockerfile中只能有一条CMD命令,多条则只执行最后一条CMD ENTRYPOINT 容器启动时执行的命令,但是一个Dockerfile中只能有一条CMD命令,多条则只 阅读全文
posted @ 2019-09-30 11:07 信方 编辑
摘要:配置方式 kubernetes版本大于或者等于1.2时,外部网络(即非K8S集群内的网络)访问cluster IP的办法是:修改master的/etc/kubernetes/proxy,把KUBE_PROXY_ARGS=”“改为KUBE_PROXY_ARGS=”–proxy-mode=userspa 阅读全文
posted @ 2019-09-30 11:05 信方 编辑
摘要:kubeadm安装安装环境(vm6.5下虚拟机3台,centos 7.4):master:10.20.0.191Node1:10.20.0.192Node2:10.20.0.193 1.安装虚拟机,配置网络接口;2.修改主机名hostnamectl set-hostname k8s-master3. 阅读全文
posted @ 2019-09-30 11:00 信方 编辑
摘要:配置 kubeadm 概述 安装 kubernetes 主要是安装它的各个镜像,而 kubeadm 已经为我们集成好了运行 kubernetes 所需的基本镜像。但由于国内的网络原因,在搭建环境时,无法拉取到这些镜像。此时我们只需要修改为阿里云提供的镜像服务即可解决该问题。 创建并修改配置 在 /u 阅读全文
posted @ 2019-09-30 10:58 信方 编辑
摘要:1、编写hello world脚本 #!/bin/bash # 编写hello world脚本 echo "Hello World!" 2、通过位置变量创建 Linux 系统账户及密码 #!/bin/bash # 通过位置变量创建 Linux 系统账户及密码 #$1 是执行脚本的第一个参数,$2 是 阅读全文
posted @ 2019-09-30 10:54 信方 编辑
摘要:if [ ! $# -eq 2 ] ; then echo "请输入用户名和密码以空格分开!" exit else name="$1" passwd="$2" fi cat hosts | while read hosts do echo "正在$hosts上用户$name" expect <<EO 阅读全文
posted @ 2019-09-30 10:52 信方 编辑
摘要:#!/bin/bash #script_version=v110 db_host=127.0.0.1 db_port=3306 db_username=db_test_inst db_passwd=`XXXXXXXXXXX` db_name=test MYDATE=`date +%Y%m%d%H%M 阅读全文
posted @ 2019-09-30 10:49 信方 编辑
摘要:#!/bin/bash # Describe: This is a one - button installation service script # 提示:使用此脚本时,尽量先选择第一项配置Yum源! red_col="\e[1;31m" reset_col="\e[0m" LOG_DIR=/u 阅读全文
posted @ 2019-09-30 10:48 信方 编辑
摘要:#!/bin/bash # 安装函数 install(){ for soft in $* do echo "$soft"安装中... yum -y install $soft &>/dev/null if [ $? -ne 0 ];then # echo "$soft"安装失败 echo "$sof 阅读全文
posted @ 2019-09-30 10:46 信方 编辑
摘要:首先,需要检查expect是否安装:rpm -qa|grep expect 然后,在操作机上创建公钥:ssh-keygen 一路回车即可 创建好之后到/root/.ssh/下就可以看到id开头的2个文件,其中id_rsa.pub就是公钥文件,需要做的就是将这个文件传送给其他机器:ssh-copy-i 阅读全文
posted @ 2019-09-30 10:45 信方 编辑
摘要:同一文件夹下建立pwd.txt,格式如下: ip username password ip username password 3.sh 阅读全文
posted @ 2019-09-30 10:42 信方 编辑
摘要:hostname配置1)修改主机名hostnamectl set-hostname xxx2)加入主机映射vim /etc/hosts……关闭selinuxsed -i '/^SELINUX/s/=.*/=disabled/' /etc/selinux/configsetenforce 0修改Lin 阅读全文
posted @ 2019-09-29 17:25 信方 编辑
摘要:1)服务端配置 在192.168.0.1 root用户下操作 yum install -y ntp ntpdate 修改etc/ntp.conf 注释所有的server和restrict 加入: server 0.cn.pool.ntp.org server 0.asia.pool.ntp.org 阅读全文
posted @ 2019-09-29 17:20 信方 编辑
摘要:1)程序准备tar xvf flannel-v0.10.0-linux-amd64.tar.gz mkdir -p /data/projects/common/kubernetes/{bin,cfg,ssl}mv flanneld mk-docker-opts.sh kubernetes/bin以下 阅读全文
posted @ 2019-09-29 17:15 信方 编辑
摘要:https://blog.csdn.net/fy_long/article/details/86542872 1)程序准备tar xvf etcd-v3.3.11-linux-amd64.tar.gz mkdir -p etcd/{bin,cfg,ssl}mv etcd-v3.3.11-linux- 阅读全文
posted @ 2019-09-29 16:59 信方 编辑
摘要:1)下载cfssl 2)制作etcd证书 3)制作kubernetes证书 阅读全文
posted @ 2019-09-29 16:45 信方 编辑
摘要:1)软件清单操作系统:CentOS7Kubernetes版本:v1.14.2flannel:v0.10.0ectd3:v3.3.11Docker版本:v18.09.0-ceDocker-compose:v1.24.0Helm:v2.14.3mkdir -p /app/k8s2)下载wget http 阅读全文
posted @ 2019-09-29 16:44 信方 编辑
摘要:limits.conf 文件实际是 Linux PAM(插入式认证模块,Pluggable Authentication Modules)中 pam_limits.so 的配置文件,而且只针对于单个会话。 limits.conf的格式如下: username|@groupname type reso 阅读全文
posted @ 2019-09-04 16:01 信方 编辑

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