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

nginx-ingress-controllerを検証する #6

Closed
takezyou opened this issue Aug 15, 2019 · 14 comments
Closed

nginx-ingress-controllerを検証する #6

takezyou opened this issue Aug 15, 2019 · 14 comments
Assignees
Labels
middle タスクの優先度 中 verify 検証

Comments

@takezyou
Copy link
Owner

お試しでドメインでアクセスできる用にするために使ってみる

@takezyou takezyou added middle タスクの優先度 中 verify 検証 labels Aug 15, 2019
@takezyou
Copy link
Owner Author

@Soto-Soto これって結局試してないよね??

@soto0201
Copy link
Collaborator

今日のタスクにしようかと思っていました…

@soto0201
Copy link
Collaborator

こちらの方を進めていました
https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/
nginx-ingress-controllerはk8s内部のip:portに名前を解釈する感じの流れになっていることを理解しました.
実際に使用する際のURLはhttp://なんとか(まだ使ってない沖縄の地名).ie.u-ryukyu.ac.jp/学籍番号/service名みたいな感じになりそう?

@takezyou
Copy link
Owner Author

takezyou commented Aug 30, 2019

了解です。

URLはhttp://なんとか(まだ使ってない沖縄の地名).ie.u-ryukyu.ac.jp/学籍番号/service名みたいな感じになりそう?

@Soto-Soto http://(自由にする).st.ie.u-ryukyu.ac.jp とかはできなさそう??
DNSも設定必要そう

@takezyou takezyou self-assigned this Aug 31, 2019
@takezyou
Copy link
Owner Author

takezyou commented Aug 31, 2019

https://github.com/kubernetes-incubator/external-dns
これで連携してドメイン登録できるかも
必要はない可能性が高い

@takezyou
Copy link
Owner Author

takezyou commented Aug 31, 2019

@Soto-Soto
一応できた

DNSにはワイルドカードで設定を入れる
 * IN A 10.50.0.151 ingressコントローラーのipを加える

$ kubectl run echoheaders --image=gcr.io/google_containers/echoserver:1.4 --replicas=1 --port=8080
$  kubectl expose deployment echoheaders --port=80 --target-port=8080 --name=echoheaders --external-ip=10.50.0.151
$ cat echoheaders.yml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: echo
spec:
  rules:
  - host: echo.ns.ie.u-ryukyu.ac.jp
    http:
      paths:
      - path: /
        backend:
          serviceName: echoheaders
          servicePort: 80

これで好きなドメインでアクセス可能serviceportは常に80にしてtargetportをよしなに入れてもらうとよいかも

他のでも試してみる

@takezyou
Copy link
Owner Author

takezyou commented Sep 1, 2019

そとの検証が終わったら一旦は検証を終了します。
負荷分散的なことは必要になったら考える。(多分よしなにやってくれると思うけど)

@takezyou
Copy link
Owner Author

takezyou commented Sep 1, 2019

さっき確認したらやっぱりうまくいってなかったので調査する

@soto0201
Copy link
Collaborator

@soto0201
Copy link
Collaborator

https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/
ここの内容を上のやつに適用したらできました.

k8s側の設定はほとんど変更がなく,指定するIPもk8sで立っているingressのIP(固定値)なので,
比較的簡単にDNSサーバーに登録できそうです.

@soto0201
Copy link
Collaborator

今まではminikubeの方で構築をしていたので,オンプレの方で試してみる.
多分問題なくできると思う.

@soto0201
Copy link
Collaborator

問題なくオンプレの方でもできました.

@takezyou
Copy link
Owner Author

@Soto-Soto いいすね!
今度確認したらcloseしましょう!

@soto0201
Copy link
Collaborator

soto0201 commented Oct 3, 2019

検証自体は使用に問題がないことを確認したのでcloseとする.

@soto0201 soto0201 closed this as completed Oct 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
middle タスクの優先度 中 verify 検証
Projects
None yet
Development

No branches or pull requests

2 participants