diff --git a/appendix/tricks.md b/appendix/tricks.md index 0795b2a6e..fca210a24 100644 --- a/appendix/tricks.md +++ b/appendix/tricks.md @@ -35,7 +35,7 @@ spec: 我们可以在 Pod 中为容器使用 command 为容器指定启动参数: -```Bash +```bash command: ["/bin/bash","-c","bootstrap.sh"] ``` diff --git a/concepts/cronjob.md b/concepts/cronjob.md index 510beeb98..872357286 100644 --- a/concepts/cronjob.md +++ b/concepts/cronjob.md @@ -59,7 +59,7 @@ spec: restartPolicy: OnFailure ``` -```Bash +```bash $ kubectl create -f cronjob.yaml cronjob "hello" created ``` diff --git a/concepts/garbage-collection.md b/concepts/garbage-collection.md index 5f0ed0084..3d6a3a6a1 100644 --- a/concepts/garbage-collection.md +++ b/concepts/garbage-collection.md @@ -121,7 +121,7 @@ kubectl 也支持级联删除。 通过设置 `--cascade` 为 true,可以使 下面是一个例子,使一个 ReplicaSet 的 Dependent 对象成为孤儿 Dependent: -```Bash +```bash kubectl delete replicaset my-repset --cascade=false ``` diff --git a/concepts/ingress.md b/concepts/ingress.md index 8f26820a8..cece3224c 100644 --- a/concepts/ingress.md +++ b/concepts/ingress.md @@ -240,7 +240,7 @@ Ingress controller启动时附带一些适用于所有Ingress的负载平衡策 假如你想要向已有的ingress中增加一个新的Host,你可以编辑和更新该ingress: -```Bash +```bash $ kubectl get ing NAME RULE BACKEND ADDRESS test - 178.91.123.132 diff --git a/concepts/init-containers.md b/concepts/init-containers.md index f39880e72..dc2ec8fc7 100644 --- a/concepts/init-containers.md +++ b/concepts/init-containers.md @@ -186,7 +186,7 @@ $ kubectl logs myapp-pod -c init-mydb # Inspect the second init container 一旦我们启动了 `mydb` 和 `myservice` 这两个 Service,我们能够看到 Init 容器完成,并且 `myapp-pod` 被创建: -```Bash +```bash $ kubectl create -f services.yaml service "myservice" created service "mydb" created diff --git a/develop/client-go-sample.md b/develop/client-go-sample.md index b75f6eb6c..1695cd974 100644 --- a/develop/client-go-sample.md +++ b/develop/client-go-sample.md @@ -16,7 +16,7 @@ 代码如下: -```Go +```go package main import ( @@ -154,7 +154,7 @@ New image -> harbor-001.jimmysong.io/library/analytics-docker-test:Build_9 查看Deployment的event。 -```Bash +```bash $ kubectl describe deployment filebeat-test Name: filebeat-test Namespace: default diff --git a/guide/authenticate-across-clusters-kubeconfig.md b/guide/authenticate-across-clusters-kubeconfig.md index 71ddcc008..2df82d29a 100644 --- a/guide/authenticate-across-clusters-kubeconfig.md +++ b/guide/authenticate-across-clusters-kubeconfig.md @@ -266,7 +266,7 @@ users: #### 示例文件相关操作命令 -```Bash +```bash $ kubectl config set preferences.colors true $ kubectl config set-cluster cow-cluster --server=http://cow.org:8080 --api-version=v1 $ kubectl config set-cluster horse-cluster --server=https://horse.org:4443 --certificate-authority=path/to/my/cafile diff --git a/guide/configure-pod-service-account.md b/guide/configure-pod-service-account.md index 412c16753..42059a35b 100644 --- a/guide/configure-pod-service-account.md +++ b/guide/configure-pod-service-account.md @@ -271,7 +271,7 @@ namespace: 7 bytes 然后,确认已创建。如: -```Bash +```bash $ kubectl get secrets myregistrykey NAME TYPE DATA AGE myregistrykey kubernetes.io/.dockerconfigjson 1 1d diff --git a/guide/docker-cli-to-kubectl.md b/guide/docker-cli-to-kubectl.md index 4860b1061..a3ab60773 100644 --- a/guide/docker-cli-to-kubectl.md +++ b/guide/docker-cli-to-kubectl.md @@ -257,7 +257,7 @@ WARNING: No swap limit support 使用 kubectl 命令: -```Bash +```bash $ kubectl cluster-info Kubernetes master is running at https://108.59.85.141 KubeDNS is running at https://108.59.85.141/api/v1/namespaces/kube-system/services/kube-dns/proxy diff --git a/guide/managing-tls-in-a-cluster.md b/guide/managing-tls-in-a-cluster.md index 21c2c671b..e718d3ba6 100644 --- a/guide/managing-tls-in-a-cluster.md +++ b/guide/managing-tls-in-a-cluster.md @@ -22,7 +22,7 @@ 通过运行以下命令生成私钥和证书签名请求(或CSR): -```Bash +```bash $ cat < show databases; +--------------------+ | Database | diff --git a/practice/using-glusterfs-for-persistent-storage.md b/practice/using-glusterfs-for-persistent-storage.md index e3b3d63d6..cf9c1040c 100644 --- a/practice/using-glusterfs-for-persistent-storage.md +++ b/practice/using-glusterfs-for-persistent-storage.md @@ -33,7 +33,7 @@ $ systemctl status glusterd.service ## 配置 glusterfs -```Bash +```bash # 配置 hosts $ vi /etc/hosts @@ -268,7 +268,7 @@ PVC属性 ## 配置PVC -```Bash +```bash $ cat glusterfs-pvc.yaml kind: PersistentVolumeClaim apiVersion: v1 @@ -293,7 +293,7 @@ glusterfs-nginx Bound gluster-dev-volume 8Gi RWX ## 创建 nginx deployment 挂载 volume -```Bash +```bash $ vi nginx-deployment.yaml apiVersion: extensions/v1beta1 kind: Deployment