Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with my GKE cluster #1

Open
jlandure opened this issue Nov 5, 2016 · 2 comments
Open

Not working with my GKE cluster #1

jlandure opened this issue Nov 5, 2016 · 2 comments

Comments

@jlandure
Copy link

jlandure commented Nov 5, 2016

Hi @kelseyhightower

I got an issue reusing your app.

./hello -kubernetes -replicas 3  -cpu-limit 200m -memory-limit 500M -api-host 104.199.5.214
Starting hello-universe...
Building hello-universe binary...
Created: /var/folders/rb/f4ps_9l54p52yq7q_rrgwjxr0000gn/T/749990009/hello-universe
Uploading f389aaad9aba374e32ebc71f33b0fd94b4bef03d9970570db0327302952f2389/hello-universe to the hello-universe-jlandure bucket...
Upload complete.
Creating hello-universe ReplicaSet...
Post http://104.199.5.214/apis/extensions/v1beta1/namespaces/default/replicasets: dial tcp 104.199.5.214:80: i/o timeout

Do you know why I got an i/o timeout using my GKE cluster?

NB: For the $HELLO_UNIVERSE_TOKEN (used to dialog with K8S right?), I've used the classic:

HELLO-UNIVERSE-TOKEN=$(kubectl describe secret $(kubectl get secrets | grep default | cut -f1 -d ' ') | grep -E '^token' | cut -f2 -d':' | tr -d '\t')

Can you help me replaying your dotGO demo?

@owulveryck
Copy link

Hello,

Actually I cannot make it work either.
I've set up a kubernetes environment on the google cloud platform and create the hello-universe app. I have also uploaded my own alpine image in my private registry.

The point is that the container do not run because it cannot locate the hello-universe binary (which is normally present in the pod shared volume after a succeffull initialization):

  5s    5s      1       {kubelet gke-hello-world-default-pool-c986f517-aqxk}    spec.containers{hello-universe} Warning Failed  Failed to start container with docker id faac488b7bd4 with error: Error response from daemon: Conta
iner command '/root/hello-universe' not found or does not exist.

I have dig a little bit in the code, and I have tried to change the annotation from pod.alpha.kubernetes.io/init-containers to pod.beta.kubernetes.io/init-containers without any luck.

The annotation is working. The init phase is ok, but it looks that the volume is not properly mounted in the container or has been cleared.

It looks like a bug in the kuernetes stack.

Here is the post command generated by my binary:

{
  "apiVersion": "extensions/v1beta1",
  "kind": "ReplicaSet",
  "metadata": {
    "name": "hello-universe",
    "namespace": "default",
    "generateName": "",
    "resourceVersion": "",
    "selfLink": "",
    "labels": null,
    "annotations": null,
    "uid": ""
  },
  "spec": {
    "replicas": 3,
    "selector": {
      "matchLabels": {
        "run": "hello-universe"
      }
    },
    "template": {
      "metadata": {
        "name": "",
        "namespace": "",
        "generateName": "",
        "resourceVersion": "",
        "selfLink": "",
        "labels": {
          "run": "hello-universe"
        },
        "annotations": {
          "pod.beta.kubernetes.io/init-containers": "[\n {\n  \"args\": [\n   \"-O\",\n   \"/root/hello-universe\",\n   \"https://storage.googleapis.com/owulveryck/14dc3dc9f8a27de96afdba7efd94594312a22214e660a70e35636124f8cfad6
b/hello-universe\"\n  ],\n  \"command\": [\n   \"wget\"\n  ],\n  \"workingDir\": \"/\",\n  \"image\": \"gcr.io/my-kubernetes-lab-146109/alpine\",\n  \"name\": \"install\",\n  \"volumeMounts\": [\n   {\n    \"name\": \"gobin\",\
n    \"mountPath\": \"/root\"\n   }\n  ],\n  \"resources\": {}\n },\n {\n  \"args\": [\n   \"+x\",\n   \"/root/hello-universe\"\n  ],\n  \"command\": [\n   \"chmod\"\n  ],\n  \"workingDir\": \"/\",\n  \"image\": \"gcr.io/my-kub
ernetes-lab-146109/alpine\",\n  \"name\": \"configure\",\n  \"volumeMounts\": [\n   {\n    \"name\": \"gobin\",\n    \"mountPath\": \"/root\"\n   }\n  ],\n  \"resources\": {}\n }\n]"
        },
        "uid": ""
      },
      "spec": {
        "containers": [
          {
            "args": [
              "-http=0.0.0.0:80"
            ],
            "command": [
              "/root/hello-universe"
            ],
            "workingDir": "/",
            "env": [
              {
                "name": "HELLO_UNIVERSE_TOKEN"
              }
            ],
            "image": "gcr.io/my-kubernetes-lab-146109/alpine",
            "name": "hello-universe",
            "volumeMounts": [
              {
                "name": "gobin",
                "mountPath": "/root"
              }
            ],
            "resources": {
              "limits": {
                "cpu": "200m",
                "memory": "100M"
              },
              "requests": {
                "cpu": "100m",
                "memory": "64M"
              }
            }
          }
        ],
        "volumes": [
          {
            "name": "gobin",
            "emptyDir": {}
          }
        ]
      }
    }
  }
}

I'm running kubernetes 1.4.4, but I've tried to downgraded my cluster to 1.3 but the issue remains.

Another thing is: what is the use of HELLO_UNIVERSE_TOKEN? Regarding the source, it looks like it can be used by the hello-universe binary itself but not by the kubernetes stack. Am I right ?

@jlandure
Copy link
Author

Any news?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants