关于“Hello Node Kubernetes”的评价

关于“Hello Node Kubernetes”的评价

评论

When building/running the docker image, the PROJECT_ID won't exist if copied as is. How about using an environment variable: PROJECT_ID=$(gcloud config list --format 'value(core.project)') docker build -t gcr.io/$PROJECT_ID/hello-node:v1 . docker run -d -p 8080:8080 gcr.io/$PROJECT_ID/hello-node:v1 ... There's also a warning that `gcloud docker` won't be supported in the future, so we might as well update the commands to use `gcloud auth configure-docker` Editing the deployment (kubectl edit deployment hello-node) and copying-pasting the new config gives me an error: A copy of your changes has been stored to "/tmp/kubectl-edit-fplln.yaml" error: no original object found for &unstructured.Unstructured{Object:map[string]interface {}{"apiVersion":"extensions/v1beta1", "kind":"Deployment", "metadata":map[string]interface {}{"namespace":"default", "resourceVersion":"151017", "uid":"981fe302-f1e9-11e5-9a78-42010af00005", "annotations":map[string]interface {}{"deployment.kubernetes.io/revision":"1"}, "g eneration":3, "labels":map[string]interface {}{"run":"hello-node"}, "name":"hello-node", "selfLink":"/apis/extensions/v1beta1/namespaces/default/deployments/hello-node", "creationTim estamp":"2016-03-24T17:55:28Z"}, "spec":map[string]interface {}{"replicas":4, "selector":map[string]interface {}{"matchLabels":map[string]interface {}{"run":"hello-node"}}, "strategy ":map[string]interface {}{"type":"RollingUpdate", "rollingUpdate":map[string]interface {}{"maxSurge":1, "maxUnavailable":1}}, "template":map[string]interface {}{"metadata":map[string ]interface {}{"creationTimestamp":interface {}(nil), "labels":map[string]interface {}{"run":"hello-node"}}, "spec":map[string]interface {}{"containers":[]interface {}{map[string]inte rface {}{"terminationMessagePath":"/dev/termination-log", "image":"gcr.io/PROJECT_ID/hello-node:v1", "imagePullPolicy":"IfNotPresent", "name":"hello-node", "ports":[]interface {}{map [string]interface {}{"containerPort":8080, "protocol":"TCP"}}, "resources":map[string]interface {}{}}}, "dnsPolicy":"ClusterFirst", "restartPolicy":"Always", "securityContext":map[st ring]interface {}{}, "terminationGracePeriodSeconds":30}}}}} After exploring it, it's also because there are mentions of PROJECT_ID, we just have to mention to replace it with your actual project ID

David C. · 评论almost 6 years之前

When building/running the docker image, the PROJECT_ID won't exist if copied as is. How about using an environment variable: PROJECT_ID=$(gcloud config list --format 'value(core.project)') docker build -t gcr.io/$PROJECT_ID/hello-node:v1 . docker run -d -p 8080:8080 gcr.io/$PROJECT_ID/hello-node:v1 ... There's also a warning that `gcloud docker` won't be supported in the future, so we might as well update the commands to use `gcloud auth configure-docker` Editing the deployment (kubectl edit deployment hello-node) and copying-pasting the new config gives me an error: A copy of your changes has been stored to "/tmp/kubectl-edit-fplln.yaml" error: no original object found for &unstructured.Unstructured{Object:map[string]interface {}{"apiVersion":"extensions/v1beta1", "kind":"Deployment", "metadata":map[string]interface {}{"namespace":"default", "resourceVersion":"151017", "uid":"981fe302-f1e9-11e5-9a78-42010af00005", "annotations":map[string]interface {}{"deployment.kubernetes.io/revision":"1"}, "g eneration":3, "labels":map[string]interface {}{"run":"hello-node"}, "name":"hello-node", "selfLink":"/apis/extensions/v1beta1/namespaces/default/deployments/hello-node", "creationTim estamp":"2016-03-24T17:55:28Z"}, "spec":map[string]interface {}{"replicas":4, "selector":map[string]interface {}{"matchLabels":map[string]interface {}{"run":"hello-node"}}, "strategy ":map[string]interface {}{"type":"RollingUpdate", "rollingUpdate":map[string]interface {}{"maxSurge":1, "maxUnavailable":1}}, "template":map[string]interface {}{"metadata":map[string ]interface {}{"creationTimestamp":interface {}(nil), "labels":map[string]interface {}{"run":"hello-node"}}, "spec":map[string]interface {}{"containers":[]interface {}{map[string]inte rface {}{"terminationMessagePath":"/dev/termination-log", "image":"gcr.io/PROJECT_ID/hello-node:v1", "imagePullPolicy":"IfNotPresent", "name":"hello-node", "ports":[]interface {}{map [string]interface {}{"containerPort":8080, "protocol":"TCP"}}, "resources":map[string]interface {}{}}}, "dnsPolicy":"ClusterFirst", "restartPolicy":"Always", "securityContext":map[st ring]interface {}{}, "terminationGracePeriodSeconds":30}}}}} After exploring it, it's also because there are mentions of PROJECT_ID, we just have to mention to replace it with your actual project ID

David C. · 评论almost 6 years之前

Jimmy S. · 评论almost 6 years之前

Morgan P. · 评论almost 6 years之前

Itsarapong I. · 评论almost 6 years之前

thankyou

Jerick Oasan K. · 评论almost 6 years之前

HungWei L. · 评论almost 6 years之前

Token for the kubernetes dashboard at the end didn't work for myself and a colleague

Chris F. · 评论almost 6 years之前

HungWei L. · 评论almost 6 years之前

Couldn't authenticate with the token to see the kubernetes UI

Tomas M. · 评论almost 6 years之前

Excellent!

Christian De Vera T. · 评论almost 6 years之前

Walter P. · 评论almost 6 years之前

Rodrigo G. · 评论almost 6 years之前

amazing, it's easy to make cluster

Agung W. · 评论almost 6 years之前

Pak Ming W. · 评论almost 6 years之前

Leo S. · 评论almost 6 years之前

Pak Ming W. · 评论almost 6 years之前

Lab needs update: Before deploying on GKE, kubectl needs credentials, which can be acquired through "gcloud container clusters get-credentials hello-world --zone=<ZONE.

Peter B. · 评论almost 6 years之前

yes thanks!

Romar S. · 评论almost 6 years之前

Gabrielle Ann D. · 评论almost 6 years之前

great!

karen e. · 评论almost 6 years之前

great!

karen e. · 评论almost 6 years之前

Excellent!

Christian De Vera T. · 评论almost 6 years之前

Leo S. · 评论almost 6 years之前

great

Jemmy W. · 评论almost 6 years之前

我们无法确保发布的评价来自已购买或已使用产品的消费者。评价未经 Google 核实。