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

Closed
matti opened this issue Dec 17, 2018 · 18 comments
Closed

google cloud shell support #182

matti opened this issue Dec 17, 2018 · 18 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence.
Milestone

Comments

@matti
Copy link
Contributor

matti 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
Copy link
Member

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

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Dec 17, 2018
@BenTheElder BenTheElder added this to the 1.0 milestone Dec 17, 2018
@BenTheElder
Copy link
Member

BenTheElder 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
Copy link
Member

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
Copy link
Member

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

@BenTheElder BenTheElder added priority/backlog Higher priority than priority/awaiting-more-evidence. and removed priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels May 3, 2019
@aojea
Copy link
Contributor

aojea 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
Copy link
Member

BenTheElder commented May 3, 2019 via email

@aojea
Copy link
Contributor

aojea 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
Copy link
Member

BenTheElder commented May 3, 2019 via email

@BenTheElder
Copy link
Member

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
Copy link
Contributor

aojea commented May 3, 2019

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

@BenTheElder
Copy link
Member

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

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 2, 2019
@BenTheElder
Copy link
Member

it's not clear to me that this is clearly feasible or that any similar tool works there.

it would be neat, but I don't think we have the time.

if anyone is interested in the future feel free to try again and report back / file a new issue

@sirdarckcat
Copy link

fyi kubernetes/minikube#6404 got it working

@aojea
Copy link
Contributor

aojea commented Jan 19, 2021

I think that this may fix it #1995

@BenTheElder BenTheElder reopened this Jan 19, 2021
@BenTheElder BenTheElder removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 20, 2021
@BenTheElder
Copy link
Member

This is indeed fixed at HEAD, and will work in the next release (soon!), you can test it now by running the following from your cloudshell:

GO111MODULE=on go get sigs.k8s.io/kind@master
export PATH="${HOME}/gopath/bin:${PATH}"
kind create cluster

@BenTheElder
Copy link
Member

thanks @aojea @sirdarckcat :-)

@BenTheElder
Copy link
Member

Screen Shot 2021-01-19 at 9 04 02 PM

stg-0 pushed a commit to stg-0/kind that referenced this issue Jun 30, 2023
…dard_sc_type

changed to standard sc by default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

No branches or pull requests

6 participants