国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

k8s configmap 詳解

這篇具有很好參考價(jià)值的文章主要介紹了k8s configmap 詳解。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

一、概述

ConfigMap是k8s的一個(gè)配置管理組件,可以將配置以key-value的形式傳遞,通常用來(lái)保存不需要加密的配置信息,加密信息則需用到Secret,主要用來(lái)應(yīng)對(duì)以下場(chǎng)景:

  • 生成為容器內(nèi)的環(huán)境變量;

  • 設(shè)置容器啟動(dòng)命令的啟動(dòng)參數(shù)(需設(shè)置為環(huán)境變量)

  • 以Volume的形式掛載為容器內(nèi)部的文件或目錄。文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-494011.html

二、創(chuàng)建configmap

  • 從普通文件創(chuàng)建
1: 創(chuàng)建configmap
[root@node1 ~]# 
[root@node1 ~]# kubectl create ns configmap
namespace/configmap created
[root@node1 ~]# 
[root@node1 ~]# kubectl create cm test-config --from-file=/root/local.repo -n configmap
configmap/test-config created

2:查看configmap內(nèi)容
[root@node1 ~]# kubectl get cm -n configmap
NAME               DATA   AGE
kube-root-ca.crt   1      41s
test-config        1      39s
[root@node1 ~]# kubectl describe  cm test-config -n configmap
Name:         test-config
Namespace:    configmap
Labels:       <none>
Annotations:  <none>

Data
====
local.repo:
----
[local]
name=local repo from http
baseurl=http://192.168.10.162:7080
enabled=1
gpgcheck=0



BinaryData
====

Events:  <none>
  • 從目錄創(chuàng)建cm
1:創(chuàng)建對(duì)應(yīng)的cm信息
[root@node1 ~]# mkdir config
[root@node1 ~]# echo hello > config/hello.txt
[root@node1 ~]# echo world > config/world.txt
[root@node1 ~]# 
[root@node1 ~]# kubectl create cm test-config-dir --from-file=/root/config -n configmap
configmap/test-config-dir created
[root@node1 ~]# 

2:查看cm
[root@node1 ~]# kubectl get cm -n configmap
NAME               DATA   AGE
kube-root-ca.crt   1      3m58s
test-config        1      3m56s
test-config-dir    2      66s
[root@node1 ~]# 
[root@node1 ~]# kubectl describe  cm test-config-dir -n configmap
Name:         test-config-dir
Namespace:    configmap
Labels:       <none>
Annotations:  <none>

Data
====
hello.txt:
----
hello

world.txt:
----
world


BinaryData
====

Events:  <none>
[root@node1 ~]# 
  • 自定義數(shù)據(jù)源
類(lèi)似和從文件創(chuàng)建一樣,多了一個(gè)key的定義
[root@node1 ~]# kubectl create configmap cm-data --from-file=test-cm-define=/etc/yum.repos.d/local.repo  -n configmap
configmap/cm-data created
[root@node1 ~]# 
[root@node1 ~]# kubectl get cm -n configmap
NAME               DATA   AGE
cm-data            1      31s
kube-root-ca.crt   1      14m
test-config        1      14m
test-config-dir    2      11m
[root@node1 ~]# kubectl describe  cm cm-data -n configmap
Name:         cm-data
Namespace:    configmap
Labels:       <none>
Annotations:  <none>

Data
====
test-cm-define:
----
[local]
name=local repo from http
baseurl=http://192.168.10.162:7080
enabled=1
gpgcheck=0



BinaryData
====

Events:  <none>
[root@node1 ~]# 

  • 從字符集創(chuàng)建
[root@node1 ~]# kubectl create cm test-cm-zifu --from-literal=name=www --from-literal=edge=30 -n configmap
configmap/test-cm-zifu created
[root@node1 ~]# kubectl get cm -n configmap
NAME               DATA   AGE
cm-data            1      4m43s
kube-root-ca.crt   1      18m
test-cm-zifu       2      2s
test-config        1      18m
test-config-dir    2      16m
[root@node1 ~]# kubectl describe  cm test-cm-zifu -n configmap
Name:         test-cm-zifu
Namespace:    configmap
Labels:       <none>
Annotations:  <none>

Data
====
edge:
----
30
name:
----
www

BinaryData
====

Events:  <none>
[root@node1 ~]# 
  • 從yaml創(chuàng)建
1:編輯yaml文件

---
apiVersion: v1
data:
  customization.cnf: |-
    [mysqld]
    datadir = /mariadb_data
    lower_case_table_names = 1
    sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
    character-set-server=utf8
    [client]
    default-character-set=utf8
kind: ConfigMap
metadata:
  name: mysql-config
  namespace: configmap
  
[root@node1 ~]# kubectl apply -f  configmap.yaml 
configmap/mysql-config created
[root@node1 ~]# kubectl get cm -n configmap
NAME               DATA   AGE
cm-data            1      9m24s
kube-root-ca.crt   1      23m
mysql-config       1      2s
test-cm-zifu       2      4m43s
test-config        1      23m
test-config-dir    2      20m
[root@node1 ~]# kubectl describe  cm mysql-config -n configmap
Name:         mysql-config
Namespace:    configmap
Labels:       <none>
Annotations:  <none>

Data
====
customization.cnf:
----
[mysqld]
datadir = /mariadb_data
lower_case_table_names = 1
sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
character-set-server=utf8
[client]
default-character-set=utf8

BinaryData
====

Events:  <none>
[root@node1 ~]# 

三、configmap應(yīng)用

  • 以volume形式掛載
1:編輯podyaml文件
---
apiVersion: v1
kind: Pod
metadata:
  name: nginx
  namespace: configmap                                                                                                                                                     
spec:
  containers:
  - name: nginx
    image: docker.io/library/nginx:latest
    imagePullPolicy: IfNotPresent
    volumeMounts:
    - name:  mysql-config
      mountPath: /etc/config
  volumes:
  - name: mysql-config
    configMap:
      name: mysql-config

2:?jiǎn)?dòng)pod
[root@node1 ~]# kubectl apply -f  pod.yaml 
pod/nginx created
[root@node1 ~]# kubectl get po -n configmap
NAME    READY   STATUS    RESTARTS   AGE
nginx   1/1     Running   0          7s

3:進(jìn)入pod查看掛載內(nèi)容
[root@node1 ~]# kubectl exec -it nginx bash -n configmap
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
root@nginx:/# cd etc/config/
root@nginx:/etc/config# ls
customization.cnf
root@nginx:/etc/config# cat customization.cnf 
[mysqld]
datadir = /mariadb_data
lower_case_table_names = 1
sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
character-set-server=utf8
[client]
default-character-set=utf8root@nginx:/etc/config# 
  • 以環(huán)境變量的形式使用cm
1:創(chuàng)建cm
[root@node1 ~]# kubectl create cm cm-zifu --from-literal=testname=www --from-literal=testedge=30 -n configmap
configmap/cm-zifu created

2:pod使用
---        
apiVersion: v1
kind: Pod  
metadata:  
  name: nginx-env
  namespace: configmap
spec:      
  containers:
  - name: nginx
    image: docker.io/library/nginx:latest
    imagePullPolicy: IfNotPresent
    env:   
    - name: testname
      valueFrom:
        configMapKeyRef:
          name: cm-zifu                                                                                                                                                    
          key: testname
    - name: testedge
      valueFrom:
        configMapKeyRef:
          name: cm-zifu
          key: testedge
          
 3:?jiǎn)?dòng)pod,查看env         
[root@node1 ~]# kubectl apply -f  pod.yaml 
pod/nginx-env created
[root@node1 ~]# kubectl get po -n configmap
NAME        READY   STATUS    RESTARTS   AGE
nginx       1/1     Running   0          16m
nginx-env   1/1     Running   0          5s
[root@node1 ~]# kubectl exec -it nginx-env bash -n configmap
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
root@nginx-env:/# env  | grep test
testedge=30
testname=www
root@nginx-env:/# 
  • 以啟動(dòng)參數(shù)傳入
一下以nginx 為例
1:首選查看nginx鏡像的啟動(dòng)參數(shù)
[root@node1 ~]# crictl   inspecti docker.io/library/nginx:latest |more
        "Entrypoint": [
          "/docker-entrypoint.sh"
        ],
        "Cmd": [
          "nginx",
          "-g",
          "daemon off;"
        ],

2:先以正常的pod啟動(dòng),編輯yaml文件
---  
apiVersion: v1
kind: Pod
metadata:
  name: nginx-cmd
  namespace: configmap
spec:
  containers:
  - name: nginx
    image: docker.io/library/nginx:latest
    imagePullPolicy: IfNotPresent
    command: ["/docker-entrypoint.sh"]
    args: ["nginx", "-g", "daemon off;"]
    
3:?jiǎn)?dòng)pod,查看啟動(dòng)日志
[root@node1 ~]# kubectl apply -f  pod.yaml 
pod/nginx-cmd created
[root@node1 ~]# 
[root@node1 ~]# 
[root@node1 ~]# kubectl logs nginx-cmd -n configmap
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2023/06/19 08:14:36 [notice] 1#1: using the "epoll" event method
2023/06/19 08:14:36 [notice] 1#1: nginx/1.21.6
2023/06/19 08:14:36 [notice] 1#1: built by gcc 10.2.1 20210110 (Debian 10.2.1-6) 
2023/06/19 08:14:36 [notice] 1#1: OS: Linux 3.10.0-1160.6.1.el7.x86_64
2023/06/19 08:14:36 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2023/06/19 08:14:36 [notice] 1#1: start worker processes
2023/06/19 08:14:36 [notice] 1#1: start worker process 32
2023/06/19 08:14:36 [notice] 1#1: start worker process 33
2023/06/19 08:14:36 [notice] 1#1: start worker process 34
2023/06/19 08:14:36 [notice] 1#1: start worker process 35

[root@node1 ~]# kubectl get po -n configmap  -o wide 
NAME        READY   STATUS    RESTARTS   AGE   IP             NODE    NOMINATED NODE   READINESS GATES
nginx       1/1     Running   0          87m   10.233.96.28   node2   <none>           <none>
nginx-cmd   1/1     Running   0          15s   10.233.96.36   node2   <none>           <none>
nginx-env   1/1     Running   0          70m   10.233.92.33   node3   <none>           <none>
[root@node1 ~]# curl 10.233.96.36
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a >nginx.org</a>.<br/>
Commercial support is available at
<a >nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>

4:**創(chuàng)建cm,指定參數(shù)**
[root@node1 ~]# kubectl create configmap nginx-cmd --from-literal=daemon="daemon off"  -n configmap
configmap/nginx-cmd created
[root@node1 ~]# kubectl get cm/nginx-cmd  -n configmap 
NAME        DATA   AGE
nginx-cmd   1      18s

5:編輯pod使用cm
---  
apiVersion: v1
kind: Pod
metadata:
  name: nginx-cmd
  namespace: configmap
spec:
  containers:
  - name: nginx
    image: docker.io/library/nginx:latest
    imagePullPolicy: IfNotPresent
    command: ["/docker-entrypoint.sh"]
    args: ["nginx", "-g", "$(daemon-cmd);"]                                                                                                                                
    env:
    - name: daemon-cmd
      valueFrom:
        configMapKeyRef:
          name:  nginx-cmd
          key: daemon
          
6:?jiǎn)?dòng)pod測(cè)試
[root@node1 ~]# kubectl apply -f  pod.yaml 
pod/nginx-cmd created
[root@node1 ~]# kubectl get po -n configmap -owide 
NAME        READY   STATUS    RESTARTS   AGE    IP             NODE    NOMINATED NODE   READINESS GATES
nginx-cmd   1/1     Running   0          2m5s   10.233.90.20   node1   <none>           <none>

[root@node1 ~]# kubectl logs nginx-cmd -n configmap
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2023/06/19 08:24:04 [notice] 1#1: using the "epoll" event method
2023/06/19 08:24:04 [notice] 1#1: nginx/1.21.6
2023/06/19 08:24:04 [notice] 1#1: built by gcc 10.2.1 20210110 (Debian 10.2.1-6) 
2023/06/19 08:24:04 [notice] 1#1: OS: Linux 3.10.0-1160.6.1.el7.x86_64
2023/06/19 08:24:04 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2023/06/19 08:24:04 [notice] 1#1: start worker processes
2023/06/19 08:24:04 [notice] 1#1: start worker process 31
2023/06/19 08:24:04 [notice] 1#1: start worker process 32
2023/06/19 08:24:04 [notice] 1#1: start worker process 33
2023/06/19 08:24:04 [notice] 1#1: start worker process 34

7:測(cè)試業(yè)務(wù)正常
[root@node1 ~]# curl 10.233.90.20
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a >nginx.org</a>.<br/>
Commercial support is available at
<a >nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>

  • 使用某一個(gè)cm的key作為volume掛載
1:創(chuàng)建一個(gè)多個(gè)from-file的cm
kubectl create configmap multi-file --from-file=test-cm-define=/etc/yum.repos.d/local.repo --from-file=/root/cert.pem --from-file=/root/dashboard.yaml  -n configmap

2:編輯yaml 使用此cm的某一個(gè)key
---
apiVersion: v1
kind: Pod
metadata:
  name: nginx-key
  namespace: configmap
spec:
  containers:
  - name: nginx
    image: docker.io/library/nginx:latest
    imagePullPolicy: IfNotPresent
    volumeMounts:
    - name: localrepo
      mountPath: /etc/yum.repos.d
  volumes:
  - name: localrepo
    configMap:
      name: multi-file
      items:
      - key: test-cm-define     ###指定單獨(dú)的key
        path: loca.repo         ###掛載路徑
        
3:?jiǎn)?dòng)pod,查看
[root@node1 ~]# kubectl apply -f   pod-key.yaml 
pod/nginx-key created
[root@node1 ~]# kubectl exec -it  nginx-key  bash -n configmap
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
root@nginx-key:/# cd etc/yum.repos.d/
root@nginx-key:/etc/yum.repos.d# 
root@nginx-key:/etc/yum.repos.d# ls
loca.repo
root@nginx-key:/etc/yum.repos.d#

到了這里,關(guān)于k8s configmap 詳解的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶(hù)投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • 學(xué)習(xí)筆記二十九:K8S配置管理中心Configmap實(shí)現(xiàn)微服務(wù)配置管理

    學(xué)習(xí)筆記二十九:K8S配置管理中心Configmap實(shí)現(xiàn)微服務(wù)配置管理

    Configmap是k8s中的資源對(duì)象,用于保存非機(jī)密性的配置的,數(shù)據(jù)可以用key/value鍵值對(duì)的形式保存,也可通過(guò)文件的形式保存。 Configmap能解決哪些問(wèn)題? 我們?cè)诓渴鸱?wù)的時(shí)候,每個(gè)服務(wù)都有自己的配置文件,如果一臺(tái)服務(wù)器上部署多個(gè)服務(wù):nginx、tomcat、apache等,那么這些配置

    2024年02月06日
    瀏覽(17)
  • k8s概念-ConfigMap

    回到目錄 一般用于去存儲(chǔ) Pod 中應(yīng)用所需的一些配置信息,或者環(huán)境變量,將配置于 Pod 分開(kāi),避免應(yīng)為修改配置導(dǎo)致還需要重新構(gòu)建 鏡像與容器。 1 創(chuàng)建ConfigMap 1.1?將指定目錄下所有文件加載到配置文件中 1.2?指定一個(gè)或多個(gè)文件和key 1.3?命令上手動(dòng)添加key-value 2?configma

    2024年02月14日
    瀏覽(24)
  • 輕松掌握K8S使用kubectl操作配置文件掛載ConfigMap和密鑰Secret知識(shí)點(diǎn)05

    輕松掌握K8S使用kubectl操作配置文件掛載ConfigMap和密鑰Secret知識(shí)點(diǎn)05

    1、掛載應(yīng)用配置文件配置集ConfigMap 當(dāng)有許多應(yīng)用如redis、mysql,希望將它的配置文件掛載出去,以便隨時(shí)修改,可以用ConfigMap配置集 具體用法查看使用命令行操作里的 3、ConfigMap配置集實(shí)戰(zhàn) 2、掛載應(yīng)用配置文件的敏感信息Secret Secret 對(duì)象類(lèi)型用來(lái)保存敏感信息,例如使用ya

    2024年02月16日
    瀏覽(26)
  • 開(kāi)源項(xiàng)目ChatGPT-Next-Web的容器化部署(四)-- k8s容器部署使用configmap配置

    開(kāi)源項(xiàng)目ChatGPT-Next-Web的容器化部署(四)-- k8s容器部署使用configmap配置

    本文的內(nèi)容是在k8s容器中,如何使用configmap對(duì).env文件進(jìn)行掛載,實(shí)現(xiàn)環(huán)境的差異化配置。 項(xiàng)目ChatGPT-Next-Web使用了.env文件來(lái)配置不同環(huán)境下的值: 所以,我們同理新增兩個(gè)配置文件,見(jiàn)下: 生產(chǎn)環(huán)境的.env文件對(duì)應(yīng)生產(chǎn)環(huán)境的數(shù)據(jù)庫(kù)連接等信息,不可能寫(xiě)在上面的源碼中。

    2024年04月12日
    瀏覽(24)
  • Kubernetes技術(shù)--k8s核心技術(shù) configMap

    Kubernetes技術(shù)--k8s核心技術(shù) configMap

    1.概述 ?? configMap最主要的作用是 存儲(chǔ)一些 不加密 的數(shù)據(jù) 到 /etcd ,讓pod以變量或者數(shù)據(jù)卷(volume)掛載到容器。 ?? 應(yīng)用場(chǎng)景:配置文件、存儲(chǔ)信息等 2.使用 -1. 創(chuàng)建配置文件。 這里我們需要先編寫(xiě)一個(gè)配置文件。使用redis,如下所示:

    2024年02月10日
    瀏覽(27)
  • k8s里pv pvc configmap

    通過(guò)storageClassName 將PV 和PVC 關(guān)聯(lián)起來(lái)。

    2024年02月11日
    瀏覽(20)
  • K8s Deployment掛載ConfigMap權(quán)限設(shè)置

    目錄 樣例 其中“defaultMode: 420”是設(shè)置權(quán)限的 在K8s(Kubernetes)中, defaultMode 是用來(lái)設(shè)置Configmap掛載后的文件權(quán)限,它采用Unix文件權(quán)限標(biāo)準(zhǔn)。 420 是8進(jìn)制數(shù)字,轉(zhuǎn)換成二進(jìn)制是 100100000 ,轉(zhuǎn)換成文件權(quán)限碼就是 0644 。 文件權(quán)限碼 0644 代表所有者(owner)有讀/寫(xiě)權(quán)限(6=4+2),

    2024年02月20日
    瀏覽(20)
  • K8S初級(jí)入門(mén)系列之四-Namespace/ConfigMap/Secret

    K8S初級(jí)入門(mén)系列之四-Namespace/ConfigMap/Secret

    ? ? ?本章節(jié)我們繼續(xù)學(xué)習(xí)Namespace、ConfigMap、Secret基礎(chǔ)概念,了解他們基本用法和操作。NameSpace為命名空間,在同一集群中試下資源隔離。ConfigMap通過(guò)key-value的方式實(shí)現(xiàn)明文配置數(shù)據(jù)的保存,Secret與ConfigMap類(lèi)似,不過(guò)是采用密文方式保存。 ? ? ?K8S集群可以通過(guò)Namespace創(chuàng)建多

    2024年02月15日
    瀏覽(31)
  • 云原生-k8s核心概念(pod,deploy,service,ingress,configmap,volume)

    云原生-k8s核心概念(pod,deploy,service,ingress,configmap,volume)

    Gitee-k8s學(xué)習(xí) 云原生實(shí)戰(zhàn)-kubernetes核心實(shí)戰(zhàn) Namespace是kubernetes系統(tǒng)中的一種非常重要資源,它的主要作用是用來(lái)實(shí)現(xiàn)多套環(huán)境的資源隔離或者多租戶(hù)的資源隔離 Pod可以認(rèn)為是容器的封裝,一個(gè)Pod中可以存在一個(gè)或者多個(gè)容器。 kubernetes很少直接控制Pod,一般都是通過(guò)Pod控制器來(lái)

    2024年02月03日
    瀏覽(160)
  • 飛天使-k8s知識(shí)點(diǎn)12-kubernetes資源對(duì)象5-Volume與ConfigMap等

    為什么需要volume ConfigMap Volume nfs掛載volume 持久卷的痛點(diǎn) 參考文檔: 作者:又拍云 鏈接:https://juejin.cn/post/7186925237592653884 來(lái)源:稀土掘金

    2024年01月18日
    瀏覽(21)

覺(jué)得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包