創(chuàng)建StatefulSet。
名稱 | 類型 | IN | 必選 | 描述 |
---|---|---|---|---|
X-Auth-Token
|
string | header | 是 |
用戶Token。 通過調(diào)用 IAM 服務(wù)獲取用戶Token接口獲取(響應(yīng)消息頭中X-Subject-Token的值)。 |
Content-Type
|
string | header | 是 |
消息體的類型(格式),默認取值為“application/json” |
namespace
|
string | path | 是 |
object name and auth scope, such as for teams and projects |
dryRun
|
string | query | 否 |
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
fieldManager
|
string | query | 否 |
fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. |
pretty
|
string | query | 否 |
If 'true', then the output is pretty printed. |
創(chuàng)建一個名為“statefulset-test”的StatefuiSet負載,使用 redis 鏡像創(chuàng)建3個Pod。
OK
"apiVersion": "apps/v1",
"kind": "StatefulSet",
"metadata": {
"creationTimestamp": "2018-09-04T07:13:00Z",
"generation": 1,
"labels": {
"app": "statefulset-test"
},
"name": "statefulset-test",
"namespace": "namespace-test",
"resourceVersion": "5207623",
"selfLink": "/apis/apps/v1/namespaces/namespace-test/statefulsets/statefulset-test",
"uid": "f4a35f35-b011-11e8-b6ef-f898ef6c78b4"
},
"spec": {
"podManagementPolicy": "OrderedReady",
"replicas": 3,
"revisionHistoryLimit": 10,
"selector": {
"matchLabels": {
"app": "statefulset-test"
}
},
"serviceName": "",
"template": {
"metadata": {
"annotations": {
"cri.cci.io/container-type": "secure-container"
},
"creationTimestamp": null,
"labels": {
"app": "statefulset-test"
}
},
"spec": {
"containers": [
{
"image": "redis",
"imagePullPolicy": "IfNotPresent",
"name": "container-0",
"resources": {
"limits": {
"cpu": "500m",
"memory": "1Gi"
},
"requests": {
"cpu": "500m",
"memory": "1Gi"
}
},
"terminationMessagePath": "/dev/termination-log",
"terminationMessagePolicy": "File"
}
],
"dnsPolicy": "ClusterFirst",
"imagePullSecrets": [
{
"name": "imagepull-secret"
}
],
"restartPolicy": "Always",
"schedulerName": "default-scheduler",
"securityContext": {}
}
},
"updateStrategy": {
"type": "OnDelete"
}
},
"status": {
"replicas": 0
}
}
最新文章
- 如何創(chuàng)建網(wǎng)站
- ModelArts模型訓練_創(chuàng)建訓練作業(yè)_如何創(chuàng)建訓練作業(yè)
- 容器鏡像創(chuàng)建用戶并授權(quán)使用SWR_華為云SWR_容器鏡像創(chuàng)建授權(quán)
- 如何使用模板創(chuàng)建函數(shù)_模板創(chuàng)建函數(shù)_函數(shù)工作流 FunctionGraph-華為云
- 如何創(chuàng)建用戶并授權(quán)使用應(yīng)用運維管理服務(wù)_AOM_用戶權(quán)限_創(chuàng)建用戶_權(quán)限
- 如何創(chuàng)建用戶并授權(quán)使用應(yīng)用管理與運維平臺_應(yīng)用管理與運維平臺_創(chuàng)建用戶_用戶授權(quán)