增加pod配置模板

pull/20/head
Jimmy Song 2017-06-26 12:04:18 +08:00
parent 4ef03c9375
commit db575ad166
2 changed files with 75 additions and 2 deletions

View File

@ -1,9 +1,9 @@
# Pod解析
Pod是kubernetes中可以创建的最小部署单元。
V1 core版本的Pod的配置模板见[Pod template](../manifests/template/pod-v1-template.yaml)。
## 什么是Pod
Pod就像是豌豆荚一样它由一个或者多个容器组成例如Docker容器它们共享容器存储、网络和容器运行配置项。Pod中的容器总是被同时调度有共同的运行环境。你可以把单个Pod想象成是运行独立应用的“逻辑主机”——其中运行着一个或者多个紧密耦合的应用容器——在有容器之前这些应用都是运行在几个相同的物理机或者虚拟机上。

View File

@ -0,0 +1,73 @@
apiVersion: v1
kind: Pod
metadata:
name: string
namespace: string
labels:
- name: string
annotations:
- name: string
spec:
containers:
- name: string
image: string
imagePullPolicy: [Always | Never | IfNotPresent]
command: [string]
args: [string]
workingDir: string
volumeMounts:
- name: string
mountPath: string
readOnly: boolean
ports:
- name: string
containerPort: init
hostPort: in
protocol: string
env:
- name: string
value: string
resources:
limits:
cpu: string
memory: string
livenessProbe:
exec:
command: [string]
httpGet:
path: string
port: number
host: string
scheme: string
httpHeaders:
- name: string
value: string
tcpSocket:
port: number
initialDelaySeconds: 0
timeoutSeconds: 0
periodSeconds: 0
successThreshold: 0
failureThreshold: 0
securityContext:
priviledge: false
restartPolicy: [Always | Never | OnFailure]
nodeSelector: object
imagePullSecrets:
- name: string
hostNetwork: false
volumes:
- name: string
emptyDir: {}
hostPath:
path: string
secret:
secretName: string
items:
- keys: string
path: string
configMap:
name: string
items:
- key: string
path: string