k8s挂载目录_kubernetes-subpath用法(把文件挂载在已存在的目录下,不覆盖原目录)…

  • Post author:
  • Post category:其他


以ngxin的配置文件为例子:

nginx-deployment.yaml :

apiVersion: v1

kind: ConfigMap

metadata:

name: nginx-cm

data:

nginx.conf: |

user nginx;

worker_processes 4;

worker_rlimit_nofile 48127;

error_log /var/log/nginx/error.log warn;

pid /var/run/nginx.pid;

events {

multi_accept on;

worker_connections 16384;

use epoll;

}

http {

include /etc/nginx/mime.types;

default_type application/octet-stream;

log_format main ‘$remote_addr – $remote_user [$time_local] “$request” ‘

‘$status $body_bytes_sent “$http_referer” ‘

‘”$http_user_agent” “$http_x_forwarded_for”‘;

access_log /var/log/nginx/access.log main;

sendfile on;

#tcp_nopush on;

keepalive_timeout 6



版权声明:本文为weixin_28983061原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。