nginx

k8s volume存储卷

只愿长相守 提交于 2020-12-10 09:37:07
k8s volume存储卷 介绍 volume存储卷是Pod中能够被多个容器访问的共享目录,kubernetes的volume概念,用途和目的与docker的volume比较类似,但两者不能等价,首先,kubernetes中的volume被定义在Pod上,然后被一个Pod里的多个容器挂在到具体的文件目录下;其次,kubenetes中的volume与Pod的生命周期相同,但与容器生命周期不相关,当容器终止或者重启时,volume中的数据也不会丢失,最后Volume支持多种数据类型,比如:GlusterFS,Ceph等吸纳进的分布式文件系统 emptyDir emptyDir Volume是在Pod分配到node时创建的,从他的名称就能看得出来,它的出事内容为空,并且无需指定宿主机上对应的目录文件,因为这是kubernetes自动分配的一个目录,当Pod从node上移除时,emptyDir中的数据也会被永久删除emptyDir的用途有: 临时空间,例如用于某些应用程序运行时所需的临时目录,且无需永久保留 长时间任务的中间过程checkpoint的临时保存目录 一个容器需要从另一个容器中获取数据库的目录(多容器共享目录) emptyDir的使用也比较简单,在大多数情况下,我们先在Pod生命一个Volume,然后在容器里引用该Volume并挂载到容器里的某个目录上,比如

阿里云ECS安装 jumpserver1.5.2

谁说胖子不能爱 提交于 2020-12-10 09:26:05
阿里云ECS安装 jumpserver1.5.2 阿里云ECS 公网IP :47.98.237.233 内网IP:172.16.100.255 在“安全组” 开通ECS的相关端口 一. 准备 Python3 和 Python 虚拟环境 yum -y install wget sqlite-devel xz gcc automake zlib-devel openssl-devel epel- release git wget https: // www.python.org/ftp/python/3.6.1/Python-3.6.1.tar.xz tar xvf Python- 3.6 . 1 .tar.xz && cd Python- 3.6 . 1 . /configure && make && make install cd / opt python3 - m venv py3 source /opt/py3/bin/ activate # 看到下面的提示符代表成功,以后运行 Jumpserver 都要先运行以上 source 命令,以下所有命令均在该虚拟环境中运行 (py3) [root@localhost py3] 二. 安装 Jumpserver 1.5.2 2.1 下载或 Clone 项目 项目提交较多 git clone 时较大,你可以选择去 Github

FastDFS集群搭建

房东的猫 提交于 2020-12-10 07:42:14
fastdfs下载官方镜像 https://github.com/happyfish100 下载包libfastcommon和fastdfs 两个 fastdfs-master.zip libfastcommon-master.zip fastdfs-nginx-module-master.zip http://bbs.chinaunix.net/forum-240-1.html 下载缓存包 ngx_cache_purge-2.3.tar.gz http://nginx.org/en/download.html 下载nginx包 nginx-1.16.1 ##新libfastcommon和fastdfs包 https://github.com/happyfish100 所有机器操作: mkdir /home/centos/fastdfs cd /home/centos/fastdfs sudo yum -y install make cmake gcc gcc-c++ unzip perl FastDFS 的安装(所有跟踪服务器和存储服务器均执行如下操作) 安装FastDFS依赖包libfastcommon cd /home/centos/fastdfs unzip libfastcommon-master.zip cd libfastcommon-master su root .

1

泄露秘密 提交于 2020-12-10 04:11:30
配置 consul 的 UI 界面,UI 端口为 8500;curl consul 的 web 界面状态为301 vim /data/bkce/etc/supervisor-consul.conf command=/usr/bin/consul agent -config-file=/data/bkce/etc/consul.conf -config-dir=/data/bkce/etc/consul.d -ui -client 172.27.16.113 ./bkcec stop consul ./bkcec start consul curl -I http://consul.sdlclp.com/ 在 nginx 配置 consul 的 UI 服务反向代理,访问域名为 consul-(考试编号).bkty.xyz vim /data/bkce/etc/nginx/consul.conf(在此目录下增加consul.conf文件,复制cmdb.conf即可) # vim:ft=nginx upstream OPEN_CONSUL{ server 172.27.16.131:8500 weight=1; server 172.27.16.113:8500 weight=1; server 172.27.16.83:8500 weight=1; } server { listen

在 k8s 中部署 Prometheus 和 Grafana

拜拜、爱过 提交于 2020-12-10 04:11:08
部署 Prometheus 和 Grafana 到 k8s Intro 上次我们主要分享了 asp.net core 集成 prometheus,以及简单的 prometheus 使用,在实际在 k8s 中部署的时候就不能在使用前面讲的静态配置的方式来部署了,需要使用 Prometheus 的服务发现。 部署规划 Prometheus 和 Grafana 的部署放在一个单独的 namespace —— monitoring 下面,这样的好处在于可以屏蔽掉一些细节,别的 namespace 无感知,也不需要知道它们的存在 可以使用 kubectl create namespace monitoring 来创建命名空间或者 kubectl apply 执行下面的 yaml 配置 apiVersion: v1 kind: Namespace metadata: name: monitoring 希望 prometheus 和 grafana 可以公网访问,所以需要配置一下端口号,NodePort 31100~31200 保留为基础设施使用的端口,31110 保留为 prometheus 需要的端口,31120 保留为 Grafana 端口,端口规划好后,就可以先配置 nginx 了,增加 nginx 配置如下: server { listen 443; server_name

nginx1.18.0在虚拟机上的搭建

人盡茶涼 提交于 2020-12-09 10:27:15
1、搭建nginx之前先下载安装pcre函数库 pcre 下载地址 https://sourceforge.net/projects/pcre/ 下载最新的8.44版本 2、安装pcre 下载之后rz -be上传到虚拟机,进行解压到根目录下 tar zxvf pcre-8.44.tar.gz -C./ 对当前文件夹授予全部读写权限 chmod 777 -R /root/pcre-8.44, cd 进到pcre-8.44目录下,安装gcc插件 yum -y install gcc yum -y install gcc-c++ 初始化配置并安装 ./configure make&&make install 进入pcretest命令界面 ./pcretest ctrl+c 退出,PCRE安装成功 可查看pcre版本号 pcre-config --version 3、安装nginx nginx下载地址 http://nginx.org/ , 下载稳定版nginx-1.18.0版本,rz -be从本地上传压缩包到虚拟机 解压到根目录下 tar zxvf nginx-1.18.0.tar.gz -C ./ 安装插件 yum install -y zlib-devel 进到nginx-1.18.0目录下并初始化安装配置 cd nginx-1.18.0 需要编译安装 ./configure -

AWS EB - Redirect all traffic to https

纵然是瞬间 提交于 2020-12-09 09:58:47
问题 My nodejs app is deployed on AWS EB. I already configured the https server and it is working fine. Now I need to redirect every non-https request to https with the www. as prefix, like this: GET example.com => https://www.example.com I'm using nginx and my EB instance is a single instance without load balancer in front of it. I have created a config file in the .ebextensions folder with this code Resources: sslSecurityGroupIngress: Type: AWS::EC2::SecurityGroupIngress Properties: GroupId: {

AWS EB - Redirect all traffic to https

北慕城南 提交于 2020-12-09 09:57:52
问题 My nodejs app is deployed on AWS EB. I already configured the https server and it is working fine. Now I need to redirect every non-https request to https with the www. as prefix, like this: GET example.com => https://www.example.com I'm using nginx and my EB instance is a single instance without load balancer in front of it. I have created a config file in the .ebextensions folder with this code Resources: sslSecurityGroupIngress: Type: AWS::EC2::SecurityGroupIngress Properties: GroupId: {

AWS EB - Redirect all traffic to https

 ̄綄美尐妖づ 提交于 2020-12-09 09:55:34
问题 My nodejs app is deployed on AWS EB. I already configured the https server and it is working fine. Now I need to redirect every non-https request to https with the www. as prefix, like this: GET example.com => https://www.example.com I'm using nginx and my EB instance is a single instance without load balancer in front of it. I have created a config file in the .ebextensions folder with this code Resources: sslSecurityGroupIngress: Type: AWS::EC2::SecurityGroupIngress Properties: GroupId: {

NGINX TLS termination for PostgreSQL

喜夏-厌秋 提交于 2020-12-09 09:55:20
问题 I’ve been trying to use NGINX as a TLS terminator for my PostgreSQL database but without success. When I try to connect to the database I get the following error: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. When I remove the ssl option in listen I can connect without any errors. I’ve tried running another service(Eclipse Mosquitto) with the same NGINX settings, TLS enabled, and it works fine. I’m using