
Remove the id field to fix this error: ``` $ kubectl create -f redis-slave-controller.json error validating "redis-slave-controller.json": error validating data: found invalid field id for v1.ReplicationController; if you choose to ignore these errors, turn validation off with --validate=false ``` Fixes #17846
41 lines
840 B
JSON
41 lines
840 B
JSON
{
|
|
"kind":"ReplicationController",
|
|
"apiVersion":"v1",
|
|
"metadata":{
|
|
"name":"redis-slave",
|
|
"labels":{
|
|
"app":"redis",
|
|
"role":"slave"
|
|
}
|
|
},
|
|
"spec":{
|
|
"replicas":2,
|
|
"selector":{
|
|
"app":"redis",
|
|
"role":"slave"
|
|
},
|
|
"template":{
|
|
"metadata":{
|
|
"labels":{
|
|
"app":"redis",
|
|
"role":"slave"
|
|
}
|
|
},
|
|
"spec":{
|
|
"containers":[
|
|
{
|
|
"name":"redis-slave",
|
|
"image":"kubernetes/redis-slave:v2",
|
|
"ports":[
|
|
{
|
|
"name":"redis-server",
|
|
"containerPort":6379
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|