configMap

Posted director

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了configMap相关的知识,希望对你有一定的参考价值。

apiVersion: v1
kind: ConfigMap
metadata:
  name: nginx-configmap2
data:
  default.conf: |
    server {
      listen       81;
      server_name  localhost;
      location / {
        root   /usr/share/nginx/html;
        index  index.html index.htm;
         }
      error_page   500 502 503 504  /50x.html;
      location = /50x.html {
        root   /usr/share/nginx/html;
        }
    }
  default1.conf: |
    server {
      listen       80;
      server_name  localhost;
      location / {
        root   /usr/share/nginx/html;
        index  index.html index.htm;
      }
      error_page   500 502 503 504  /50x.html;
      location = /50x.html {
        root   /usr/share/nginx/html;
      }

 

以上是关于configMap的主要内容,如果未能解决你的问题,请参考以下文章

kubernetes configMap详解

两种方法,轻松上手ConfigMap!

K8s -configmap

Pod 配置管理:configMap

Pod 配置管理:configMap

Pod 配置管理:configMap