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

google cloud shell support #182

Open
matti opened this issue Dec 17, 2018 · 11 comments

Comments

Projects
4 participants
@matti
Copy link

commented Dec 17, 2018

$ go get sigs.k8s.io/kind
...
$ kind create cluster
Creating cluster 'kind-1' ...
 βœ“ Ensuring node image (kindest/node:v1.12.3) πŸ–Ό
 βœ“ [kind-1-control-plane] Creating node container πŸ“¦
 βœ“ [kind-1-control-plane] Fixing mounts πŸ—»
 βœ“ [kind-1-control-plane] Starting systemd πŸ–₯
 βœ“ [kind-1-control-plane] Waiting for docker to be ready πŸ‹
 βœ— [kind-1-control-plane] Starting Kubernetes (this may take a minute) ☸
Error: failed to create cluster: failed to apply overlay network: exit status 1
Usage:
  kind create cluster [flags]
Flags:
      --config string   path to a kind config file
  -h, --help            help for cluster
      --image string    node docker image to use for booting the cluster
      --name string     cluster context name (default "1")
      --retain          retain nodes for debugging when cluster creation fails
      --wait duration   Wait for control plane node to be ready (default 0s)
Global Flags:
      --loglevel string   logrus log level [panic, fatal, error, warning, info, debug] (default "warning")
failed to create cluster: failed to apply overlay network: exit status 1
@BenTheElder

This comment has been minimized.

Copy link
Member

commented Dec 17, 2018

Huh, that particular failure is a bit surprising, thanks for reporting it!

We can probably avoid it when we finish offline support by using fixed versions of the overlay network and pre-obtaining the overlay images.

Possibly related to #136

/assign
/kind bug
/priority important-soon

@BenTheElder

This comment has been minimized.

Copy link
Member

commented Apr 4, 2019

#426 is one of the blockers, there also appears to be something strange with the networking.

This almost works, something is wrong with talking to the API server, will need to investigate further.

$ cat ./kind-config.yaml
kind: Cluster
apiVersion: kind.sigs.k8s.io/v1alpha3
networking:
  apiServerPort: 6443
nodes:
- role: control-plane
  extraMounts:
  - containerPath: /sys/class/dmi/id/product_name
    hostPath: /home/bentheelder/product_name

$  cat ./product_name
kind

$ kind create cluster --config=./kind-config.yaml --loglevel=debug
@BenTheElder

This comment has been minimized.

Copy link
Member

commented Apr 4, 2019

I think the web preview feature interferes. https://cloud.google.com/shell/docs/features#web_preview

It should be possible to stick to lower ports for the API server etc. which might fix that, but this will require changes to kind.

@BenTheElder

This comment has been minimized.

Copy link
Member

commented May 3, 2019

#426 was fixed, but there's still some funky networking blocking this.

@aojea

This comment has been minimized.

Copy link
Contributor

commented May 3, 2019

@BenTheElder you can define the port range in the host, it's defined in the kernel in
/proc/sys/net/ipv4/ip_local_port_range

How is the setup? is kind running in a VM in GCE?

@BenTheElder

This comment has been minimized.

Copy link
Member

commented May 3, 2019

@aojea

This comment has been minimized.

Copy link
Contributor

commented May 3, 2019

It's working for me running from https://console.cloud.google.com/cloudshell , but don't know if this is the same situation you are describing πŸ˜…

antonio_ojea_garcia@cloudshell:~ (agile-sprite-239512)$ go get sigs.k8s.io/kind
antonio_ojea_garcia@cloudshell:~ (agile-sprite-239512)$ kind create cluster
Creating cluster "kind" ...
 βœ“ Ensuring node image (kindest/node:v1.14.1) πŸ–Ό
 βœ“ Preparing nodes πŸ“¦
export KUBECONFIG="$(kind get kubeconfig-path --name="kind")"
kubectl cluster-info
antonio_ojea_garcia@cloudshell:~ (agile-sprite-239512)$ export KUBECONFIG="$(kind get kubeconfig-path --name="kind")"
antonio_ojea_garcia@cloudshell:~ (agile-sprite-239512)$ kubectl get nodes
NAME                 STATUS     ROLES    AGE   VERSION
kind-control-plane   NotReady   master   25s   v1.14.1
antonio_ojea_garcia@cloudshell:~ (agile-sprite-239512)$ kubectl get nodes -o wide
NAME                 STATUS     ROLES    AGE   VERSION   INTERNAL-IP   EXTERNAL-IP   OS-IMAGE                                  KERNEL-VERSION   CONTAINER-RUNTIME
kind-control-plane   NotReady   master   29s   v1.14.1   172.18.0.2    <none>        Ubuntu Disco Dingo (development branch)   4.14.104+        containerd://1.2.6-0ubuntu1

The port forwarded is within the allowed range (2000 to 65000)

antonio_ojea_garcia@cloudshell:~ (agile-sprite-239512)$ docker ps
CONTAINER ID        IMAGE                  COMMAND                  CREATED              STATUS              PORTS                                  NAMES
c6d2f3edda33        kindest/node:v1.14.1   "/usr/local/bin/entr…"   About a minute ago   Up About a minute   38797/tcp, 127.0.0.1:38797->6443/tcp   kind-control-plane

And the port range defined is within the webshell range (2000 to 65000) too

antonio_ojea_garcia@cloudshell:~ (agile-sprite-239512)$ cat /proc/sys/net/ipv4/ip_local_port_range
32768   60999
@BenTheElder

This comment has been minimized.

Copy link
Member

commented May 3, 2019

@BenTheElder

This comment has been minimized.

Copy link
Member

commented May 3, 2019

I observe an issue dialing the CRI socket, only some of the static pods come up. not sure why, but overall this not working quite right is not surprising. cat /proc/1/cgroup πŸ˜‰

@aojea

This comment has been minimized.

Copy link
Contributor

commented May 3, 2019

hehe, s/working/runs without errors/
definitively it needs more testing

@BenTheElder

This comment has been minimized.

Copy link
Member

commented May 3, 2019

did a little more poking, something is killing containerd πŸ€”

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.