Ingress
ポッド内の画像に接続することになっているを実行しています。私がやるdescribe
とそれはうまく見えます例えば
$ kubectl describe svc solar-demo
Name: solar-demo
Namespace: default
Labels: <none>
Annotations: kubectl.kubernetes.io/last-applied-configuration={"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"name":"solar-demo","namespace":"default"},"spec":{"ports":[{"name":"city","port":3000...
Selector: app=solardemo
Type: ClusterIP
IP: 10.97.245.248
Port: city 3000/TCP
TargetPort: 3000/TCP
Endpoints: 172.17.0.4:3000,172.17.0.6:3000
Port: solar 3001/TCP
TargetPort: 3001/TCP
Endpoints: 172.17.0.4:3001,172.17.0.6:3001
Session Affinity: None
Events: <none>
それは私の画像のIPアドレスさえ正しくリストします。ただし、サービスにアクセスしようとすると、ルートを要求するだけで404が返されます。これは、マップ/
を何にもマップせず、503
ルート/solar
やにアクセスしようとするとエラーが発生するため、問題ありません/city
。
ログを確認すると、次のように返されます。
$ kubectl logs solar-demo-5845984b94-xp82l solar-svc
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info lifecycle [email protected]~prestart-solar-svc: [email protected]
npm info lifecycle [email protected]~start-solar-svc: [email protected]
> [email protected] start-solar-svc /opt/app-root/src
> node solar-svc.js
{"level":30,"time":1530271233676,"msg":"Server listening at http://0.0.0.0:3001","pid":26,"hostname":"solar-demo-5845984b94-xp82l","v":1}
server listening on 3001
他のサービスについても同じことが言えます。
$ kubectl logs solar-demo-5845984b94-xp82l api
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info lifecycle [email protected]~prestart-api: [email protected]
npm info lifecycle [email protected]~start-api: [email protected]
> [email protected] start-api /opt/app-root/src
> node api.js
{"level":30,"time":1530271244205,"msg":"Server listening at http://0.0.0.0:3000","pid":21,"hostname":"solar-demo-5845984b94-xp82l","v":1}
server listening on 3000
私は503を受け取り、画像はIngress
すべてPod
がダウンしているか何かであると「考えた」かのように、リクエストを受け取ることはありません。何を確認できますか?
$ curl -v http://shmukler.example.com/solar
* Trying 192.168.99.101...
* Connected to shmukler.example.com (192.168.99.101) port 80 (#0)
> GET /solar HTTP/1.1
> Host: shmukler.example.com
> User-Agent: curl/7.43.0
> Accept: */*
>
< HTTP/1.1 503 Service Temporarily Unavailable
< Server: nginx/1.13.7
< Date: Sun, 01 Jul 2018 13:49:38 GMT
< Content-Type: text/html
< Content-Length: 213
< Connection: keep-alive
<
<html>
<head><title>503 Service Temporarily Unavailable</title></head>
<body bgcolor="white">
<center><h1>503 Service Temporarily Unavailable</h1></center>
<hr><center>nginx/1.13.7</center>
</body>
</html>
* Connection #0 to host shmukler.example.com left intact
お知らせ下さい。
注釈で、構成が欠落していました:
nginx.org/server-snippet: "proxy_ssl_verify off;"
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加