docker - Kubernetes create Service in deployment+rbd mode, also same configured to succeed in default namespace, fail under non default namespace? -


kubernetes create service in deployment+rbd mode, same configured succeed in default namespace, fail under non default namespace?

the config(json):

{          "kind": "deployment",      "spec": {          "replicas": "1",          "template": {              "spec": {                  "volumes": [                      {                          "rbd": {                              "secretref": {                                  "name": "ceph-secret"                              },                              "image": "zhaosiyi.24",                              "fstype": "ext4",                              "readonly": false,                              "user": "admin",                              "monitors": [                                  "xxx.xxx.xxx.6:6789",                                  "xxx.xxx.xxx.7:6789",                                  "xxx.xxx.xxx.8:6789"                              ],                              "pool": "rrkd.rbd"                          },                          "name": "aa"                      }                  ],                  "imagepullsecrets": [                      {                          "name": "registrykey-m3-1"                      }                  ],                  "containers": [                      {                          "image": "ccr.ccs.tencentyun.com/rrkd/rrkd-nginx:1.0",                          "volumemounts": [                              {                                  "readonly": false,                                  "mountpath": "/mnt",                                  "name": "aa"                              }                          ],                          "name": "aa",                          "ports": [                              {                                  "protocol": "tcp",                                  "containerport": 80                              }                          ]                      }                  ]              },              "metadata": {                  "labels": {                      "name": "aa"                  }              }          },          "selector": {              "matchlabels": {                  "name": "aa"              }          }      },      "apiversion": "extensions/v1beta1",      "metadata": {          "labels": {              "name": "aa"          },          "name": "aa"      }  }  {      "kind": "service",      "spec": {          "type": "nodeport",          "ports": [              {                  "targetport": 80,                  "protocol": "tcp",                  "port": 80              }          ],          "selector": {              "name": "aa"          }      },      "apiversion": "v1",      "metadata": {          "labels": {              "name": "aa"          },          "name": "aa"      }  }

the strangest thing details of describe pod show success, without error information, get pod not successful, below:

enter image description here

enter image description here

the problem has been solved. non default of namespace unsuccessful because new namespace not have secret, authentication failed @ pull image. need manually create secret pull image. if rbd or pvc mode, need manually create secret mounting storage.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -