GoogleContainerTools / GoogleContainerTools/skaffold

Quickstart: demo app not reachable through localhost

Đang mở
#8,653 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
area/docs kind/friction priority/p2
Ngôn ngữ chính
Go
Star
15.9k
Fork
1.7k
Merge trung bình
3 ngày 9 giờ
Pull request đã merge (30 ngày)
10

Mô tả

Hello!

I've just been going through the [quickstart](https://skaffold.dev/docs/quickstart/) for Skaffold and had difficulty reaching my example app from my browser at `http://localhost:3000` as the docs describe. However, I did have success reaching the app by using the external IP as output by `kubectl get svc` for the `LoadBalancer` service.

I tried this on two separate laptops as noted in the information section below, a macbook and a Ubuntu machine. So I'm wondering, do I have something misconfigured that would allow `localhost` to work as described, or would it actually be expected that you need to use the external IP for the `LoadBalancer` service?

### Expected behavior
After following the steps outlined in the [quickstart](https://skaffold.dev/docs/quickstart/) through this section:
```
To browse to the web page, open a new terminal and run:

minikube tunnel -p custom

Now open your browser at http://localhost:3000. This displays the content of public/index.html file.
```

Navigating to `http://localhost:3000` displays "Hello World." In the browser.

### Actual behavior
Instead, the browser is unable to connect, but navigating to an external IP as output from `kubectl get svc` successfully loads the page.

I.e.:

```NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.96.0.1 443/TCP 2m39s
web LoadBalancer 10.107.176.91 10.107.176.91 3000:32452/TCP 58s
```
means `10.107.176.91:3000` will succeed.

### Information

- Skaffold version: 2.3.0
- Operating system: macOS Big Sur 11.3.1 & Ubuntu 22.04
- Installed via: skaffold.dev
- Contents of skaffold.yaml:

```yaml
apiVersion: skaffold/v4beta4
kind: Config
metadata:
name: buildpacks-node-tutorial
build:
artifacts:
- image: skaffold-buildpacks-node
buildpacks:
builder: gcr.io/buildpacks/builder:v1
manifests:
rawYaml:
- k8s/web.yaml
```

### Steps to reproduce the behavior

1. `git clone https://github.com/GoogleContainerTools/skaffold`
2. cd skaffold/examples/buildpacks-node-tutorial
3. `skaffold init`
4. Choose the builder to build image skaffold-buildpacks-node Buildpacks (package.json)
5. `minikube start --profile custom`
6. `skaffold config set --global local-cluster true`
7. `eval $(minikube -p custom docker-env)`
8. `skaffold dev`
9. This output appears: Example app listening on port 3000!
10. `minikube tunnel -p custom`
11. Unable to connect to `http://localhost:3000`

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Tái hiện quickstart từ examples/buildpacks-node-tutorial bằng skaffold.yaml, k8s/web.yaml, minikube và các lệnh được ghi trong tài liệu cho đến minikube tunnel. So sánh đường dẫn localhost:3000 được ghi trong tài liệu với địa chỉ dịch vụ từ kubectl get svc. Hoàn thành khi phương thức truy cập dự kiến của quickstart được xác minh hoặc sửa lại, đồng thời các hướng dẫn liên quan được cập nhật.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
docker, kubernetes
Lĩnh vực
devops, documentation
Loại issue
Tài liệu
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.