毎回調べるのが面倒なので、よく使用するk8sのリソースのデフォルト値を表にまとめました。
今回の対象リソースは以下3種類で、k8sの基本中の基本のリソースです。
- Service
- Deployment
- Pod
以下の表はすべてオブジェクトの spec
配下の設定のデフォルト値です。
Service
設定項目 | デフォルト値 | ||||
---|---|---|---|---|---|
ports | protocol | TCP | |||
type | ClusterIP | ||||
sessionAffinity | None | ||||
externalTrafficPolicy | Cluster | ||||
internalTrafficPolicy | Cluster | ||||
sessionAffinityConfig | clientIP | timeoutSeconds | 10800 | ||
allocateLoadBalancerNodePorts | true |
参照:
- https://kubernetes.io/docs/concepts/services-networking/service/
- https://kubernetes.io/docs/reference/kubernetes-api/service-resources/service-v1/
Deployment
設定項目 | デフォルト値 | ||||
---|---|---|---|---|---|
replicas | 1 | ||||
minReadySeconds | 0 | ||||
strategy | type | RollingUpdate | |||
rollingUpdate | maxSurge | 25% | |||
maxUnavailable | 25% | ||||
revisionHistoryLimit | 10 | ||||
progressDeadlineSeconds | 600 | ||||
paused | false |
参照:
- https://kubernetes.io/docs/concepts/workloads/controllers/deployment/
- https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/deployment-v1/
Pod
設定項目 | デフォルト値 | ||||
---|---|---|---|---|---|
enableServiceLinks | true | ||||
tolerations | operator | Equal | |||
preemptionPolicy | PreemptLowerPriority | ||||
topologySpreadConstraints | maxSkew | 1 | |||
whenUnsatisfiable | DoNotSchedule | ||||
restartPolicy | Always | ||||
terminationGracePeriodSeconds | 30 | ||||
setdostnameAsFQDN | false | ||||
dnsPolicy | ClusterFirst | ||||
hostNetwork | false | ||||
hostPID | false | ||||
hostIPC | false | ||||
shareProcessNamespace | false | ||||
securityContext | (empty) | ||||
hostUsers | true | ||||
containers / initContainers / ephemeralContainers |
imagePullPolicy | Always | |||
ports | protocol | TCP | |||
volumeMounts | mountPropagation | None | |||
readOnly | false | ||||
recursiveReadOnly | None | ||||
subPatd | "" (volume's root) | ||||
subPatdExpr | "" (volume's root) | ||||
resources | resizePolicy[] | restartPolicy | NotRequired | ||
terminationMessagePatd | /dev/termination-log | ||||
terminationMessagePolicy | File | ||||
securityContext | procMount | Default | |||
privileged | false | ||||
readOnlyRootFilesystem | false | ||||
stdin | false | ||||
stdinOnce | false | ||||
tty | false | ||||
lifecycle | postStart / preStop |
httpGet | scheme | HTTP | |
livenessProbe / readinessProbe / startupProbe |
httpGet | scheme | HTTP | ||
periodSeconds | 10 | ||||
timeoutSeconds | 1 | ||||
failuretdreshold | 3 | ||||
successtdreshold | 1 |
参照: