{"id":871,"date":"2026-10-03T01:58:21","date_gmt":"2026-10-02T16:58:21","guid":{"rendered":"http:\/\/www.ranran.mydns.jp\/blog\/?p=871"},"modified":"2026-10-03T01:58:21","modified_gmt":"2026-10-02T16:58:21","slug":"nginx-ingress%e3%82%92k8s%e5%a4%96%e3%81%ae%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%81%b8%e3%81%ae%e3%83%aa%e3%83%90%e3%83%bc%e3%82%b9%e3%83%97%e3%83%ad%e3%82%ad%e3%82%b7%e3%81%a8%e3%81%97%e3%81%a6","status":"publish","type":"post","link":"http:\/\/www.ranran.mydns.jp\/blog\/?p=871","title":{"rendered":"Nginx Ingress\u3092k8s\u5916\u306e\u30b5\u30fc\u30d0\u30fc\u3078\u306e\u30ea\u30d0\u30fc\u30b9\u30d7\u30ed\u30ad\u30b7\u3068\u3057\u3066\u4f7f\u3046"},"content":{"rendered":"\n<p>k8s\u306b\u3066Ingress\u3068\u8a00\u3048\u3070k8s\u5185\u306ePod\u3092\u516c\u958b\u3059\u308b\u6a5f\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305fIngress Controller\u306b\u306fNginx\u3084HaProxy\u306a\u3069\u306e\u7a2e\u985e\u304c\u3042\u308b\u3053\u3068\u3082\u516c\u5f0f\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u89e6\u308c\u3089\u308c\u3066\u3044\u307e\u3059\u306d\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u305d\u3046\u3044\u3063\u305f\u8aac\u660e\u3092\u8aad\u3093\u3067\u3044\u3066\u3001\u3075\u3068Nginx\u3067\u52d5\u3044\u3066\u3044\u308b\u306a\u3089Pod\u3060\u3051\u3067\u306a\u304f\u5916\u90e8\u306e\u30b5\u30fc\u30d3\u30b9\u306b\u30ea\u30d0\u30fc\u30b9\u30d7\u30ed\u30ad\u30b7\u3067\u304d\u308c\u3070\u69cb\u6210\u306e\u5e45\u304c\u5e83\u304c\u308b\u306e\u3067\u306f\uff1f\u3068\u601d\u3044\u8a2d\u5b9a\u3092\u8abf\u3079\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u7d50\u679c\u3060\u3051\u5148\u306b\u8a71\u3059\u3068k8s\u5916\u3078\u306e\u30ea\u30d0\u30fc\u30b9\u30d7\u30ed\u30ad\u30b7\u306f\u53ef\u80fd\u3067\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u304c\u69cb\u6210yaml\u306b\u306a\u308a\u307e\u3059\u3002\u30dd\u30a4\u30f3\u30c8\u306fPod\u304c\u3067\u304d\u308b\u3068\u81ea\u52d5\u7684\u306b\u4f5c\u6210\u3055\u308c\u308bEndpointo\u3092\u624b\u52d5\u3067\u4f5c\u6210\u3059\u308b\u3063\u3066\u3068\u3053\u308d\u3067\u3057\u3087\u3046\u304b\u306d\uff1f<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\napiVersion: v1\nkind: Endpoints\nmetadata:\n  name: external-media\nsubsets:\n- addresses:\n  - ip: 192.168.11.202\n  ports:\n  - port: 9000\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\napiVersion: v1\nkind: Service\nmetadata:\n  name: external-media\nspec:\n  ports:\n  - port: 9000\n    protocol: TCP\n    targetPort: 9000\n  clusterIP: None\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\napiVersion: networking.k8s.io\/v1\nkind: Ingress\nmetadata:\n  name: external-media\n  annotations:\n    nginx.ingress.kubernetes.io\/force-ssl-redirect: &quot;true&quot;\n    nginx.ingress.kubernetes.io\/proxy-body-size: 1024m\nspec:\n  rules:\n  - host: media.ranranhome.info\n    http:\n      paths:\n      - path: \/\n        pathType: Prefix\n        backend:\n          service:\n            name: external-media\n            port:\n              number: 9000\n<\/pre><\/div>\n\n\n<p>\u3053\u308c\u3067Pod\u3067\u8d77\u52d5\u3057\u3066\u3044\u306a\u3044\u30b5\u30fc\u30d3\u30b9\u3092\u5916\u90e8\u306b\u516c\u958b\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>k8s\u306b\u3066Ingress\u3068\u8a00\u3048\u3070k8s\u5185\u306ePod\u3092\u516c\u958b\u3059\u308b\u6a5f\u80fd\u3067\u3059\u3002 \u307e\u305fIngress Controller\u306b\u306fNginx\u3084HaProxy\u306a\u3069\u306e\u7a2e\u985e\u304c\u3042\u308b\u3053\u3068\u3082\u516c\u5f0f\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u89e6\u308c\u3089\u308c\u3066\u3044\u307e\u3059\u306d\u3002 \u305d\u3046\u3044\u3063\u305f\u8aac\u660e\u3092 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[53,52,58],"tags":[],"class_list":["post-871","post","type-post","status-publish","format-standard","hentry","category-k8s","category-kubernetes","category-58"],"_links":{"self":[{"href":"http:\/\/www.ranran.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/871","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.ranran.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.ranran.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.ranran.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ranran.mydns.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=871"}],"version-history":[{"count":4,"href":"http:\/\/www.ranran.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/871\/revisions"}],"predecessor-version":[{"id":876,"href":"http:\/\/www.ranran.mydns.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/871\/revisions\/876"}],"wp:attachment":[{"href":"http:\/\/www.ranran.mydns.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=871"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ranran.mydns.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=871"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.ranran.mydns.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=871"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}