diff --git a/appendix/material-share.html b/appendix/material-share.html
index 74990e721..ea4d5ddff 100644
--- a/appendix/material-share.html
+++ b/appendix/material-share.html
@@ -2527,7 +2527,7 @@
diff --git a/appendix/tricks.html b/appendix/tricks.html
index b6b2d0e32..14abe7a05 100644
--- a/appendix/tricks.html
+++ b/appendix/tricks.html
@@ -2626,7 +2626,7 @@
diff --git a/cloud-native/kubernetes-and-cloud-native-app-overview.html b/cloud-native/kubernetes-and-cloud-native-app-overview.html
index 0eb116f56..045bdbe5a 100644
--- a/cloud-native/kubernetes-and-cloud-native-app-overview.html
+++ b/cloud-native/kubernetes-and-cloud-native-app-overview.html
@@ -2808,7 +2808,7 @@
diff --git a/concepts/annotation.html b/concepts/annotation.html
index c56be151e..09c03a5ea 100644
--- a/concepts/annotation.html
+++ b/concepts/annotation.html
@@ -2521,7 +2521,7 @@
diff --git a/concepts/concepts.html b/concepts/concepts.html
index 4766dff2b..bc222451e 100644
--- a/concepts/concepts.html
+++ b/concepts/concepts.html
@@ -2538,7 +2538,7 @@
diff --git a/concepts/configmap-hot-update.html b/concepts/configmap-hot-update.html
index 7bb54f936..9f1671bf2 100644
--- a/concepts/configmap-hot-update.html
+++ b/concepts/configmap-hot-update.html
@@ -2496,85 +2496,30 @@ metadata:
uid: 18d70527-7686-11e7-bfbd-8af1e3a7c5bd
ConfigMap中的内容是存储到etcd中的,然后查询etcd:
-ETCDCTL_API=3 etcdctl get /registry/configmaps/default/nginx-config
-/registry/configmaps/default/nginx-config
+ETCDCTL_API=3 etcdctl get /registry/configmaps/default/nginx-config -w json|python -m json.tool
注意使用 v3 版本的 etcdctl API,下面是输出结果:
-k8s
-
-v1 ConfigMap�
-
-T
-
-nginx-configdefault"*$18d70527-7686-11e7-bfbd-8af1e3a7c5bd28B
- �ʀ����xz�
-
-
-nginx.conf�
- worker_processes 1;
-
-events { worker_connections 1024; }
-
-http {
- sendfile on;
-
- server {
- listen 80;
-
- # a test endpoint that returns http 200s
- location / {
- proxy_pass http://httpstat.us/200;
- proxy_set_header X-Real-IP $remote_addr;
+{
+ "count": 1,
+ "header": {
+ "cluster_id": 12091028579527406772,
+ "member_id": 16557816780141026208,
+ "raft_term": 36,
+ "revision": 29258723
+ },
+ "kvs": [
+ {
+ "create_revision": 14925806,
+ "key": "L3JlZ2lzdHJ5L2NvbmZpZ21hcHMvZGVmYXVsdC9uZ2lueC1jb25maWc=",
+ "mod_revision": 14925806,
+ "value": "azhzAAoPCgJ2MRIJQ29uZmlnTWFwEqQMClQKDG5naW54LWNvbmZpZxIAGgdkZWZhdWx0IgAqJDE4ZDcwNTI3LTc2ODYtMTFlNy1iZmJkLThhZjFlM2E3YzViZDIAOABCCwjdyoDMBRC5ss54egASywsKCm5naW54LmNvbmYSvAt3b3JrZXJfcHJvY2Vzc2VzIDE7CgpldmVudHMgeyB3b3JrZXJfY29ubmVjdGlvbnMgMTAyNDsgfQoKaHR0cCB7CiAgICBzZW5kZmlsZSBvbjsKCiAgICBzZXJ2ZXIgewogICAgICAgIGxpc3RlbiA4MDsKCiAgICAgICAgIyBhIHRlc3QgZW5kcG9pbnQgdGhhdCByZXR1cm5zIGh0dHAgMjAwcwogICAgICAgIGxvY2F0aW9uIC8gewogICAgICAgICAgICBwcm94eV9wYXNzIGh0dHA6Ly9odHRwc3RhdC51cy8yMDA7CiAgICAgICAgICAgIHByb3h5X3NldF9oZWFkZXIgIFgtUmVhbC1JUCAgJHJlbW90ZV9hZGRyOwogICAgICAgIH0KICAgIH0KCiAgICBzZXJ2ZXIgewoKICAgICAgICBsaXN0ZW4gODA7CiAgICAgICAgc2VydmVyX25hbWUgYXBpLmhlbGxvLndvcmxkOwoKICAgICAgICBsb2NhdGlvbiAvIHsKICAgICAgICAgICAgcHJveHlfcGFzcyBodHRwOi8vbDVkLmRlZmF1bHQuc3ZjLmNsdXN0ZXIubG9jYWw7CiAgICAgICAgICAgIHByb3h5X3NldF9oZWFkZXIgSG9zdCAkaG9zdDsKICAgICAgICAgICAgcHJveHlfc2V0X2hlYWRlciBDb25uZWN0aW9uICIiOwogICAgICAgICAgICBwcm94eV9odHRwX3ZlcnNpb24gMS4xOwoKICAgICAgICAgICAgbW9yZV9jbGVhcl9pbnB1dF9oZWFkZXJzICdsNWQtY3R4LSonICdsNWQtZHRhYicgJ2w1ZC1zYW1wbGUnOwogICAgICAgIH0KICAgIH0KCiAgICBzZXJ2ZXIgewoKICAgICAgICBsaXN0ZW4gODA7CiAgICAgICAgc2VydmVyX25hbWUgd3d3LmhlbGxvLndvcmxkOwoKICAgICAgICBsb2NhdGlvbiAvIHsKCgogICAgICAgICAgICAjIGFsbG93ICdlbXBsb3llZXMnIHRvIHBlcmZvcm0gZHRhYiBvdmVycmlkZXMKICAgICAgICAgICAgaWYgKCRjb29raWVfc3BlY2lhbF9lbXBsb3llZV9jb29raWUgIT0gImxldG1laW4iKSB7CiAgICAgICAgICAgICAgbW9yZV9jbGVhcl9pbnB1dF9oZWFkZXJzICdsNWQtY3R4LSonICdsNWQtZHRhYicgJ2w1ZC1zYW1wbGUnOwogICAgICAgICAgICB9CgogICAgICAgICAgICAjIGFkZCBhIGR0YWIgb3ZlcnJpZGUgdG8gZ2V0IHBlb3BsZSB0byBvdXIgYmV0YSwgd29ybGQtdjIKICAgICAgICAgICAgc2V0ICR4aGVhZGVyICIiOwoKICAgICAgICAgICAgaWYgKCRjb29raWVfc3BlY2lhbF9lbXBsb3llZV9jb29raWUgfiogImRvZ2Zvb2QiKSB7CiAgICAgICAgICAgICAgc2V0ICR4aGVhZGVyICIvaG9zdC93b3JsZCA9PiAvc3J2L3dvcmxkLXYyOyI7CiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIHByb3h5X3NldF9oZWFkZXIgJ2w1ZC1kdGFiJyAkeGhlYWRlcjsKCgogICAgICAgICAgICBwcm94eV9wYXNzIGh0dHA6Ly9sNWQuZGVmYXVsdC5zdmMuY2x1c3Rlci5sb2NhbDsKICAgICAgICAgICAgcHJveHlfc2V0X2hlYWRlciBIb3N0ICRob3N0OwogICAgICAgICAgICBwcm94eV9zZXRfaGVhZGVyIENvbm5lY3Rpb24gIiI7CiAgICAgICAgICAgIHByb3h5X2h0dHBfdmVyc2lvbiAxLjE7CiAgICAgICAgfQogICAgfQp9GgAiAA==",
+ "version": 1
}
- }
-
- server {
-
- listen 80;
- server_name api.hello.world;
-
- location / {
- proxy_pass http://l5d.default.svc.cluster.local;
- proxy_set_header Host $host;
- proxy_set_header Connection "
";
- proxy_http_version 1.1;
-
- more_clear_input_headers 'l5d-ctx-*' 'l5d-dtab' 'l5d-sample';
- }
- }
-
- server {
-
- listen 80;
- server_name www.hello.world;
-
- location / {
-
-
- # allow 'employees' to perform dtab overrides
- if ($cookie_special_employee_cookie != "letmein") {
- more_clear_input_headers 'l5d-ctx-*' 'l5d-dtab' 'l5d-sample';
- }
-
- # add a dtab override to get people to our beta, world-v2
- set $xheader "";
-
- if ($cookie_special_employee_cookie ~* "dogfood") {
- set $xheader "/host/world => /srv/world-v2;";
- }
-
- proxy_set_header 'l5d-dtab' $xheader;
-
-
- proxy_pass http://l5d.default.svc.cluster.local;
- proxy_set_header Host $host;
- proxy_set_header Connection "";
- proxy_http_version 1.1;
- }
- }
-}"
+ ]
+}
-输出中在 nginx.conf
配置文件的基础中增加了文件头内容,是kubernetes增加的。
+其中的value就是 nginx.conf
配置文件的内容。
+可以使用base64解码查看具体值,关于etcdctl的使用请参考使用etcdctl访问kuberentes数据。
代码
ConfigMap 结构体的定义:
@@ -2773,7 +2718,7 @@ DEBUG
Kubernetes中的服务发现与docker容器间的环境变量传递源码探究
@@ -2817,7 +2762,7 @@ DEBUG
diff --git a/concepts/configmap.html b/concepts/configmap.html
index 9efe5ac48..207103626 100644
--- a/concepts/configmap.html
+++ b/concepts/configmap.html
@@ -2743,7 +2743,7 @@ log_level=INFO
diff --git a/concepts/cronjob.html b/concepts/cronjob.html
index 9dfcfc6eb..d857bd8fe 100644
--- a/concepts/cronjob.html
+++ b/concepts/cronjob.html
@@ -2550,7 +2550,7 @@ job "hello-1202039034" deleted
diff --git a/concepts/daemonset.html b/concepts/daemonset.html
index 9866e0f6e..380c1ec84 100644
--- a/concepts/daemonset.html
+++ b/concepts/daemonset.html
@@ -2529,7 +2529,7 @@
diff --git a/concepts/deployment.html b/concepts/deployment.html
index dc71fed15..29756a3bc 100644
--- a/concepts/deployment.html
+++ b/concepts/deployment.html
@@ -3001,7 +3001,7 @@ $ echo $?
diff --git a/concepts/garbage-collection.html b/concepts/garbage-collection.html
index 74333efd8..ca8d871a4 100644
--- a/concepts/garbage-collection.html
+++ b/concepts/garbage-collection.html
@@ -2546,7 +2546,7 @@ curl -X DELETE localhost:8080/apis/extensions/v1beta1/namespaces/default/replica
diff --git a/concepts/horizontal-pod-autoscaling.html b/concepts/horizontal-pod-autoscaling.html
index 78b1854ce..c3897caa3 100644
--- a/concepts/horizontal-pod-autoscaling.html
+++ b/concepts/horizontal-pod-autoscaling.html
@@ -2559,7 +2559,7 @@ kubectl delete hpa
diff --git a/concepts/index.html b/concepts/index.html
index cf2ec8922..17192df1d 100644
--- a/concepts/index.html
+++ b/concepts/index.html
@@ -2522,7 +2522,7 @@ Kubernetes 还提供完善的管理]
diff --git a/concepts/ingress.html b/concepts/ingress.html
index f1692c08d..bda9e155c 100644
--- a/concepts/ingress.html
+++ b/concepts/ingress.html
@@ -2678,7 +2678,7 @@ NAME RULE BACKEND ADDRESS
diff --git a/concepts/init-containers.html b/concepts/init-containers.html
index 0569d3b1a..f9ffe0b8c 100644
--- a/concepts/init-containers.html
+++ b/concepts/init-containers.html
@@ -2652,7 +2652,7 @@ myapp-pod 1/1 Running 0 9m
diff --git a/concepts/job.html b/concepts/job.html
index d6e1adfb3..273ed2fe9 100644
--- a/concepts/job.html
+++ b/concepts/job.html
@@ -2490,7 +2490,7 @@ $ kubectl logs $pods
diff --git a/concepts/label.html b/concepts/label.html
index 5c20d4a02..0249b539b 100644
--- a/concepts/label.html
+++ b/concepts/label.html
@@ -2535,7 +2535,7 @@ $ kubectl get pods -l &apo
diff --git a/concepts/namespace.html b/concepts/namespace.html
index c5e3f09ee..9d0c12af3 100644
--- a/concepts/namespace.html
+++ b/concepts/namespace.html
@@ -2466,7 +2466,7 @@
diff --git a/concepts/network-policy.html b/concepts/network-policy.html
index 0207d29c1..0dbe30275 100644
--- a/concepts/network-policy.html
+++ b/concepts/network-policy.html
@@ -2519,7 +2519,7 @@
diff --git a/concepts/node.html b/concepts/node.html
index 4909c0d28..0dfc0093a 100644
--- a/concepts/node.html
+++ b/concepts/node.html
@@ -2489,7 +2489,7 @@
diff --git a/concepts/objects.html b/concepts/objects.html
index 8fa5fca9e..a58143942 100644
--- a/concepts/objects.html
+++ b/concepts/objects.html
@@ -2556,7 +2556,7 @@
diff --git a/concepts/pod-lifecycle.html b/concepts/pod-lifecycle.html
index a6387a03b..20e2a19ec 100644
--- a/concepts/pod-lifecycle.html
+++ b/concepts/pod-lifecycle.html
@@ -2611,7 +2611,7 @@
diff --git a/concepts/pod-overview.html b/concepts/pod-overview.html
index 4405374f3..aab0c0553 100644
--- a/concepts/pod-overview.html
+++ b/concepts/pod-overview.html
@@ -2501,7 +2501,7 @@
diff --git a/concepts/pod-security-policy.html b/concepts/pod-security-policy.html
index 208f97722..5f6a440b2 100644
--- a/concepts/pod-security-policy.html
+++ b/concepts/pod-security-policy.html
@@ -2662,7 +2662,7 @@ podsecuritypolicy "permissive" delete
diff --git a/concepts/pod.html b/concepts/pod.html
index cbaf9b59c..1176da129 100644
--- a/concepts/pod.html
+++ b/concepts/pod.html
@@ -2542,7 +2542,7 @@
diff --git a/concepts/replicaset.html b/concepts/replicaset.html
index b47505530..083d807d8 100644
--- a/concepts/replicaset.html
+++ b/concepts/replicaset.html
@@ -2506,7 +2506,7 @@
diff --git a/concepts/secret.html b/concepts/secret.html
index b5af88724..03ce41a4a 100644
--- a/concepts/secret.html
+++ b/concepts/secret.html
@@ -2584,7 +2584,7 @@ token
diff --git a/concepts/service.html b/concepts/service.html
index 18a55f248..681476d74 100644
--- a/concepts/service.html
+++ b/concepts/service.html
@@ -2789,7 +2789,7 @@ iptables 代理不会隐藏 Kubernetes 集
diff --git a/concepts/serviceaccount.html b/concepts/serviceaccount.html
index d9e7803e3..14b766b1c 100644
--- a/concepts/serviceaccount.html
+++ b/concepts/serviceaccount.html
@@ -2605,7 +2605,7 @@ serviceaccounts/default
diff --git a/concepts/statefulset.html b/concepts/statefulset.html
index 2768178de..c8b08e15d 100644
--- a/concepts/statefulset.html
+++ b/concepts/statefulset.html
@@ -2924,7 +2924,7 @@ zk-0 10.254.98.14 <nodes> 2181:31693/TCP 5m
diff --git a/concepts/volume.html b/concepts/volume.html
index 7982a3c4b..15e82ce91 100644
--- a/concepts/volume.html
+++ b/concepts/volume.html
@@ -2611,7 +2611,7 @@
diff --git a/develop/client-go-sample.html b/develop/client-go-sample.html
index b2e5d0e6d..98c465ae9 100644
--- a/develop/client-go-sample.html
+++ b/develop/client-go-sample.html
@@ -2696,7 +2696,7 @@ Events:
diff --git a/develop/contribute.html b/develop/contribute.html
index 6d3d6415b..d9b13ba95 100644
--- a/develop/contribute.html
+++ b/develop/contribute.html
@@ -2464,7 +2464,7 @@
diff --git a/develop/developing-environment.html b/develop/developing-environment.html
index 2efd34fdb..a4623309c 100644
--- a/develop/developing-environment.html
+++ b/develop/developing-environment.html
@@ -2477,7 +2477,7 @@
diff --git a/develop/index.html b/develop/index.html
index 8bd8176f5..7b6fb1a0c 100644
--- a/develop/index.html
+++ b/develop/index.html
@@ -2457,7 +2457,7 @@
diff --git a/develop/minikube.html b/develop/minikube.html
index 85337dd4a..24552669f 100644
--- a/develop/minikube.html
+++ b/develop/minikube.html
@@ -2494,7 +2494,7 @@ Kubectl is now configured to use the cluster.
diff --git a/develop/testing.html b/develop/testing.html
index 26e797e4e..2a3e943ef 100644
--- a/develop/testing.html
+++ b/develop/testing.html
@@ -2571,7 +2571,7 @@ make test_e2e_node TEST_ARGS=
diff --git a/guide/access-cluster.html b/guide/access-cluster.html
index 6de1ab734..c740f77d7 100644
--- a/guide/access-cluster.html
+++ b/guide/access-cluster.html
@@ -2667,7 +2667,7 @@ $ curl $APISERVER/api --header
diff --git a/guide/access-kubernetes-cluster.html b/guide/access-kubernetes-cluster.html
index 264db3feb..bd4d21168 100644
--- a/guide/access-kubernetes-cluster.html
+++ b/guide/access-kubernetes-cluster.html
@@ -2463,7 +2463,7 @@
diff --git a/guide/accessing-kubernetes-pods-from-outside-of-the-cluster.html b/guide/accessing-kubernetes-pods-from-outside-of-the-cluster.html
index 489b17224..b7adef6d1 100644
--- a/guide/accessing-kubernetes-pods-from-outside-of-the-cluster.html
+++ b/guide/accessing-kubernetes-pods-from-outside-of-the-cluster.html
@@ -2579,7 +2579,7 @@ influxdb 10.97.121.42 10.13.242.236 8086:30051/TCP 39s
diff --git a/guide/application-development-deployment-flow.html b/guide/application-development-deployment-flow.html
index 98622bef2..94e65d528 100644
--- a/guide/application-development-deployment-flow.html
+++ b/guide/application-development-deployment-flow.html
@@ -2458,7 +2458,7 @@
diff --git a/guide/auth-with-kubeconfig-or-token.html b/guide/auth-with-kubeconfig-or-token.html
index de42aa5d1..511280f90 100644
--- a/guide/auth-with-kubeconfig-or-token.html
+++ b/guide/auth-with-kubeconfig-or-token.html
@@ -2529,7 +2529,7 @@ ca.crt: 1310 bytes
diff --git a/guide/authenticate-across-clusters-kubeconfig.html b/guide/authenticate-across-clusters-kubeconfig.html
index ff8de95e1..5eb1e2224 100644
--- a/guide/authenticate-across-clusters-kubeconfig.html
+++ b/guide/authenticate-across-clusters-kubeconfig.html
@@ -2682,7 +2682,7 @@ $ kubectl config use-context federal-context
diff --git a/guide/authentication.html b/guide/authentication.html
index e14698b6a..9e69ba500 100644
--- a/guide/authentication.html
+++ b/guide/authentication.html
@@ -2958,7 +2958,7 @@ tar xzf easy-rsa.tar.gz
diff --git a/guide/carbin-mobile-dashboard-for-kubernetes.html b/guide/carbin-mobile-dashboard-for-kubernetes.html
index 6f2526a82..5ef4a1199 100644
--- a/guide/carbin-mobile-dashboard-for-kubernetes.html
+++ b/guide/carbin-mobile-dashboard-for-kubernetes.html
@@ -2469,7 +2469,7 @@
diff --git a/guide/cluster-security-management.html b/guide/cluster-security-management.html
index 81ba5c5fd..40654c6a2 100644
--- a/guide/cluster-security-management.html
+++ b/guide/cluster-security-management.html
@@ -2457,7 +2457,7 @@
diff --git a/guide/command-usage.html b/guide/command-usage.html
index c1171779f..5f7296441 100644
--- a/guide/command-usage.html
+++ b/guide/command-usage.html
@@ -2457,7 +2457,7 @@
diff --git a/guide/configure-liveness-readiness-probes.html b/guide/configure-liveness-readiness-probes.html
index 2ec71f4c9..45277f629 100644
--- a/guide/configure-liveness-readiness-probes.html
+++ b/guide/configure-liveness-readiness-probes.html
@@ -2646,7 +2646,7 @@ the Container has been restarted: