From ebf399cdf78a373e1f9048427eedd3c34386aa12 Mon Sep 17 00:00:00 2001 From: iProbe Date: Thu, 14 Sep 2023 19:30:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20'CloudNative/Kubernetes/Ba?= =?UTF-8?q?se/=E4=BD=BF=E7=94=A8.md'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CloudNative/Kubernetes/Base/使用.md | 222 ++++++++++++++++++++++++++++ 1 file changed, 222 insertions(+) create mode 100644 CloudNative/Kubernetes/Base/使用.md diff --git a/CloudNative/Kubernetes/Base/使用.md b/CloudNative/Kubernetes/Base/使用.md new file mode 100644 index 0000000..23b1396 --- /dev/null +++ b/CloudNative/Kubernetes/Base/使用.md @@ -0,0 +1,222 @@ +```yaml +kind: Deployment +apiVersion: apps/v1 +metadata: + name: echo-server-1 + namespace: dev + uid: 45bddc5b-fb64-4997-8599-1718011157d4 + resourceVersion: '66568877' + generation: 13 + creationTimestamp: '2023-09-14T10:29:28Z' + labels: + app: echo-server-1 + app.kubernetes.io/instance: echo-server-dev + annotations: + deployment.kubernetes.io/revision: '9' + managedFields: + - manager: cfe-apiserver + operation: Update + apiVersion: apps/v1 + time: '2023-09-14T11:26:44Z' + fieldsType: FieldsV1 + fieldsV1: + f:metadata: + f:labels: + .: {} + f:app: {} + f:app.kubernetes.io/instance: {} + f:spec: + f:progressDeadlineSeconds: {} + f:replicas: {} + f:revisionHistoryLimit: {} + f:selector: {} + f:strategy: + f:rollingUpdate: + .: {} + f:maxSurge: {} + f:maxUnavailable: {} + f:type: {} + f:template: + f:metadata: + f:labels: + .: {} + f:app: {} + f:spec: + f:containers: + k:{"name":"runtime"}: + .: {} + f:command: {} + f:env: + .: {} + k:{"name":"ARGS"}: + .: {} + f:name: {} + f:valueFrom: + .: {} + f:configMapKeyRef: {} + k:{"name":"JAVA_OPTS"}: + .: {} + f:name: {} + f:valueFrom: + .: {} + f:configMapKeyRef: {} + f:image: {} + f:imagePullPolicy: {} + f:name: {} + f:ports: + .: {} + k:{"containerPort":48080,"protocol":"TCP"}: + .: {} + f:containerPort: {} + f:name: {} + f:protocol: {} + f:resources: {} + f:terminationMessagePath: {} + f:terminationMessagePolicy: {} + f:volumeMounts: + .: {} + k:{"mountPath":"/opt"}: + .: {} + f:mountPath: {} + f:name: {} + f:readOnly: {} + f:dnsPolicy: {} + f:imagePullSecrets: + .: {} + k:{"name":"swrregistrykey"}: {} + f:initContainers: + .: {} + k:{"name":"busybox"}: + .: {} + f:command: {} + f:image: {} + f:imagePullPolicy: {} + f:name: {} + f:resources: {} + f:terminationMessagePath: {} + f:terminationMessagePolicy: {} + f:volumeMounts: + .: {} + k:{"mountPath":"/tmp"}: + .: {} + f:mountPath: {} + f:name: {} + f:restartPolicy: {} + f:schedulerName: {} + f:securityContext: {} + f:terminationGracePeriodSeconds: {} + f:volumes: + .: {} + k:{"name":"work"}: + .: {} + f:emptyDir: {} + f:name: {} + - manager: kube-controller-manager + operation: Update + apiVersion: apps/v1 + time: '2023-09-14T11:26:47Z' + fieldsType: FieldsV1 + fieldsV1: + f:metadata: + f:annotations: + .: {} + f:deployment.kubernetes.io/revision: {} + f:status: + f:availableReplicas: {} + f:conditions: + .: {} + k:{"type":"Available"}: + .: {} + f:lastTransitionTime: {} + f:lastUpdateTime: {} + f:message: {} + f:reason: {} + f:status: {} + f:type: {} + k:{"type":"Progressing"}: + .: {} + f:lastTransitionTime: {} + f:lastUpdateTime: {} + f:message: {} + f:reason: {} + f:status: {} + f:type: {} + f:observedGeneration: {} + f:readyReplicas: {} + f:replicas: {} + f:updatedReplicas: {} + subresource: status +spec: + replicas: 1 + selector: + matchLabels: + app: echo-server-1 + template: + metadata: + creationTimestamp: null + labels: + app: echo-server-1 + spec: + volumes: + - name: work + emptyDir: {} + initContainers: + - name: busybox + image: server:202309141053 + command: + - cp + - /opt/app.jar + - /tmp + resources: {} + volumeMounts: + - name: work + mountPath: /tmp + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: IfNotPresent + containers: + - name: runtime + image: openjdk:8-jdk + command: + - java + - '-jar' + - /opt/app.jar + - $ARGS + ports: + - name: http + containerPort: 48080 + protocol: TCP + env: + - name: JAVA_OPTS + valueFrom: + configMapKeyRef: + name: echo-server-cm + key: JAVA_OPTS + - name: ARGS + valueFrom: + configMapKeyRef: + name: echo-server-cm + key: ARGS + resources: {} + volumeMounts: + - name: work + readOnly: true + mountPath: /opt + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: IfNotPresent + restartPolicy: Always + terminationGracePeriodSeconds: 30 + dnsPolicy: ClusterFirst + securityContext: {} + imagePullSecrets: + - name: swrregistrykey + schedulerName: default-scheduler + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 25% + maxSurge: 25% + revisionHistoryLimit: 10 + progressDeadlineSeconds: 600 +``` \ No newline at end of file