kind-ci / examples

Repository providing samples and testing for running sigs.k8s.io/kind on various CI services
https://sigs.k8s.io/kind
Apache License 2.0
178 stars 41 forks source link

kind on CloudBuild port forwarding is hard to follow #24

Closed Goodwine closed 4 years ago

Goodwine commented 4 years ago

On the gcb.md file we have an awk command that is hard to follow:

port="$( awk -F: '/server:/{ print $4 }' "$$KUBECONFIG" )"

I understand this is getting the 4th element on the line that matches server: within the file $KUBECONFIG, but this requires that I should know what the contents of that file are, could you add an example of what this specific line is meant to be?

Goodwine commented 4 years ago

An based on the kind repo I noticed this would be configured somewhat like:

# ...
clusters:
- cluster:
    server: https://123.456.789.012:3456
# ...

And this will match 3456 [source]

Goodwine commented 4 years ago

I also noticed that kind configuration supposedly looks like (source):

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
  apiServerAddress: "127.0.0.1"
  apiServerPort: 1234

I've sent a PR updating the instructions to read this value instead