{"id":1297,"date":"2025-05-19T17:37:39","date_gmt":"2025-05-19T08:37:39","guid":{"rendered":"https:\/\/itstudy365.com\/blog\/?p=1297"},"modified":"2025-05-27T21:58:50","modified_gmt":"2025-05-27T12:58:50","slug":"kubernetes-learning-%e7%ac%ac15%e7%ab%a0%ef%bc%9aservice%e3%81%a8ingress%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%9f%e5%85%ac%e9%96%8b","status":"publish","type":"post","link":"https:\/\/itstudy365.com\/blog\/2025\/05\/19\/kubernetes-learning-%e7%ac%ac15%e7%ab%a0%ef%bc%9aservice%e3%81%a8ingress%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%9f%e5%85%ac%e9%96%8b\/","title":{"rendered":"Kubernetes Learning \u7b2c15\u7ae0\uff1aService\u3068Ingress\u3092\u4f7f\u3063\u305f\u516c\u958b"},"content":{"rendered":"\n<button id=\"bb1\" type=\"button\" value=\"Play\" class=\"responsivevoice-button\" title=\"ResponsiveVoice Tap to Start\/Stop Speech\"><span>&#128266; Play<\/span><\/button>\n        <script>\n            bb1.onclick = function(){\n                if(responsiveVoice.isPlaying()){\n                    responsiveVoice.cancel();\n                }else{\n                    responsiveVoice.speak(\"Kubernetes\u30af\u30e9\u30b9\u30bf\u30fc\u306e\u4e2d\u3067\u52d5\u3044\u3066\u3044\u308b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u3001\u5916\u90e8\u306e\u30e6\u30fc\u30b6\u30fc\u304c\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u516c\u958b\u3059\u308b\u65b9\u6cd5\u3092\u5b66\u3073\u307e\u3057\u3087\u3046\u3002\u3053\u3053\u3067\u306f\u3001\u4ee5\u4e0b\u306e2\u3064\u306e\u4ed5\u7d44\u307f\u3092\u4f7f\u3044\u307e\u3059\u3002 Service\uff08\u30b5\u30fc\u30d3\u30b9\uff09\uff1aPod\u3078\u306e\u30a2\u30af\u30bb\u30b9\u3092\u62bd\u8c61\u5316 Ingress\uff08\u30a4\u30f3\u30b0\u30ec\u30b9\uff09\uff1aHTTP\/HTTPS\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u5165\u308a\u53e3 \ud83c\udf10 \u306a\u305c\u5fc5\u8981\uff1f Kubernetes\u3067\u306fPod\u304c\u81ea\u52d5\u7684\u306b\u518d\u8d77\u52d5\u30fb\u518d\u4f5c\u6210\u3055\u308c\u308b\u305f\u3081\u3001Pod\u306b\u76f4\u63a5\u30a2\u30af\u30bb\u30b9\u3059\u308b\u306e\u306f\u4e0d\u5b89\u5b9a\u3067\u3059\u3002\u307e\u305f\u3001Pod\u306f\u30af\u30e9\u30b9\u30bf\u30fc\u5185\u90e8\u3067\u3057\u304b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u305b\u3093\u3002\u305d\u3053\u3067\u3001 Service\u3092\u4f7f\u3063\u3066\u5b89\u5b9a\u3057\u305f\u300c\u540d\u524d\u4ed8\u304d\u30a2\u30af\u30bb\u30b9\u53e3\u300d\u3092\u7528\u610f\u3057\u3001 Ingress\u3092\u4f7f\u3063\u3066\u5916\u90e8\u304b\u3089\u306eHTTP\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u30eb\u30fc\u30eb\u306b\u5f93\u3063\u3066\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3057\u307e\u3059\u3002 \ud83e\udded \u5168\u4f53\u30a4\u30e1\u30fc\u30b8\u56f3 [ \u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8 ] \u2193\uff08HTTP\uff09 [ Ingress Controller ] \u2193\uff08\u30eb\u30fc\u30eb\u306b\u5f93\u3063\u3066\u632f\u308a\u5206\u3051\uff09 [ Service ] \u2193\uff08Pod\u306e\u524d\u6bb5\uff09 [ Pod\uff08\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\uff09 ] \ud83e\uddf1 Service\u3068\u306f\uff1f Service\u306f\u3001Pod\u306e\u524d\u306b\u7acb\u3064\\\"\u7a93\u53e3\\\"\u306e\u3088\u3046\u306a\u3082\u306e\u3067\u3059\u3002Pod\u306fIP\u304c\u5909\u308f\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u304c\u3001Service\u306f\u56fa\u5b9a\u540d\uff08DNS\u540d\uff09\u3067\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002 \u305f\u3068\u3048\u3070\u6b21\u306e\u3088\u3046\u306aService\u3092\u4f5c\u308b\u3068\u3001springboot-service\u3068\u3044\u3046\u540d\u524d\u3067Pod\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\uff1a apiVersion: v1 kind: Service metadata: name: springboot-service spec: selector: app: springboot ports: - port: 80 targetPort: 8080 type: ClusterIP selector\uff1a\u5bfe\u8c61\u3068\u306a\u308bPod\u306e\u30e9\u30d9\u30eb port\uff1aService\u304c\u53d7\u3051\u53d6\u308b\u30dd\u30fc\u30c8\u756a\u53f7 targetPort\uff1aPod\u306e\u4e2d\u3067\u30a2\u30d7\u30ea\u304c\u5f85\u3061\u53d7\u3051\u3066\u3044\u308b\u30dd\u30fc\u30c8 type: ClusterIP\u306f\u30af\u30e9\u30b9\u30bf\u30fc\u5185\u90e8\u5c02\u7528\u3002\u5916\u90e8\u516c\u958b\u306b\u306f NodePort \u3084 LoadBalancer \u3082\u3042\u308b\u304c\u3001\u4eca\u56de\u306fIngress\u3067\u5236\u5fa1\u3059\u308b\u305f\u3081 ClusterIP \u306e\u307e\u307e\u3067OK\u3067\u3059\u3002 \ud83c\udf00 Ingress\u3068\u306f\uff1f Ingress\u306f\u3001**\u300cHTTP\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u3069\u306eService\u306b\u6e21\u3059\u304b\u300d**\u3092\u5b9a\u7fa9\u3059\u308b\u30eb\u30fc\u30eb\u96c6\u3067\u3059\u3002 apiVersion: networking.k8s.io\/v1 kind: Ingress metadata: name: springboot-ingress annotations: nginx.ingress.kubernetes.io\/rewrite-target: \/ spec: rules: - host: myapp.local http: paths: - path: \/ pathType: Prefix backend: service: name: springboot-service port: number: 80 \u30dd\u30a4\u30f3\u30c8\uff1a host: \u30c9\u30e1\u30a4\u30f3\u540d\uff08\u305f\u3068\u3048\u3070 myapp.local\uff09 path: URL\u30d1\u30b9\uff08\/api \u306a\u3069\u3082\u53ef\uff09 backend: \u5bfe\u5fdc\u3059\u308bService\u540d\u3068\u30dd\u30fc\u30c8 \u3053\u306e\u8a2d\u5b9a\u3092\u3059\u308b\u3068\u3001http:\/\/myapp.local\/ \u3078\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u304c springboot-service \u7d4c\u7531\u3067Pod\u306b\u5c4a\u304d\u307e\u3059\u3002 \u2699\ufe0f Ingress Controller\u304c\u5fc5\u8981 Ingress\u306f\u300c\u30eb\u30fc\u30eb\u300d\u3060\u3051\u306a\u306e\u3067\u3001\u5b9f\u969b\u306e\u51e6\u7406\u306f Ingress Controller \u304c\u884c\u3044\u307e\u3059\u3002\u3088\u304f\u4f7f\u308f\u308c\u308b\u306e\u306f\uff1a NGINX Ingress Controller Traefik Cloud Load Balancer (\u30af\u30e9\u30a6\u30c9\u7279\u5316\u578b) Minikube\u3092\u4f7f\u3063\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u3067 NGINX Ingress Controller \u3092\u6709\u52b9\u5316\u3067\u304d\u307e\u3059\uff1a minikube addons enable ingress \ud83d\udd01 Service\u3068Ingress\u306e\u5f79\u5272\u307e\u3068\u3081 \u5f79\u5272\u5bfe\u8c61\u7528\u9014Service\u5185\u90e8Pod\u9593\u901a\u4fe1\u30fb\u5185\u90e8\u30ed\u30fc\u30c9\u30d0\u30e9\u30f3\u30b9Ingress\u5916\u90e8\u30c9\u30e1\u30a4\u30f3\uff0b\u30d1\u30b9\u30d9\u30fc\u30b9\u306e\u5916\u90e8\u516c\u958b \ud83d\udca1 Tips \u8907\u6570\u30a2\u30d7\u30ea\u306e\u516c\u958b\u3082\u53ef\u80fd\u3067\u3059\uff08\/app1, \/app2\u306a\u3069\u3067\u632f\u308a\u5206\u3051\uff09 HTTPS\u3082Ingress\u3067\u5bfe\u5fdc\u53ef\u80fd\uff08Let\\'s Encrypt\u9023\u643a\u306a\u3069\uff09 Ingress\u3068Service\u3092\u9023\u643a\u3059\u308b\u3053\u3068\u3067\u3001Pod\u306eIP\u5909\u5316\u306b\u5f37\u3044\u69cb\u6210\u304c\u4f5c\u308c\u307e\u3059 \ud83e\uddea \u52d5\u4f5c\u78ba\u8a8d\u306e\u4f8b kubectl get ingress curl -H \\\"Host: myapp.local\\\" http:\/\/less thanminikube-ipgreater than\/ \u203b \/etc\/hosts \u306b myapp.local \u306e\u8a2d\u5b9a\u3092\u8ffd\u52a0\u3059\u308c\u3070\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3082\u53ef\u80fd\u3067\u3059\u3002 \ud83d\udce6 \u307e\u3068\u3081 Service\u306fPod\u306e\u524d\u306b\u7acb\u3064\u5185\u90e8\u306e\u30b2\u30fc\u30c8 Ingress\u306f\u5916\u90e8\u304b\u3089\u306eHTTP\u30a2\u30af\u30bb\u30b9\u3092Service\u306b\u632f\u308a\u5206\u3051\u308b\u30eb\u30fc\u30eb Minikube\u3084\u30af\u30e9\u30a6\u30c9\u3067\u306fIngress Controller\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5fc5\u8981 \u3053\u308c\u3092\u62bc\u3055\u3048\u308c\u3070\u3001Kubernetes\u4e0a\u306eWeb\u30a2\u30d7\u30ea\u3092\u300c\u30e6\u30fc\u30b6\u30fc\u304c\u4f7f\u3048\u308b\u72b6\u614b\u300d\u3067\u904b\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\uff01\", \"Japanese Female\");\n                }\n            };\n        <\/script>\n    <\/p>\n\n\n\n<p>Kubernetes\u30af\u30e9\u30b9\u30bf\u30fc\u306e\u4e2d\u3067\u52d5\u3044\u3066\u3044\u308b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u3001<strong>\u5916\u90e8\u306e\u30e6\u30fc\u30b6\u30fc\u304c\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u516c\u958b\u3059\u308b\u65b9\u6cd5<\/strong>\u3092\u5b66\u3073\u307e\u3057\u3087\u3046\u3002\u3053\u3053\u3067\u306f\u3001\u4ee5\u4e0b\u306e2\u3064\u306e\u4ed5\u7d44\u307f\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<ul>\n<li><strong>Service\uff08\u30b5\u30fc\u30d3\u30b9\uff09<\/strong>\uff1aPod\u3078\u306e\u30a2\u30af\u30bb\u30b9\u3092\u62bd\u8c61\u5316<\/li>\n\n\n\n<li><strong>Ingress\uff08\u30a4\u30f3\u30b0\u30ec\u30b9\uff09<\/strong>\uff1aHTTP\/HTTPS\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u5165\u308a\u53e3<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83c\udf10 \u306a\u305c\u5fc5\u8981\uff1f<\/h3>\n\n\n\n<p>Kubernetes\u3067\u306fPod\u304c\u81ea\u52d5\u7684\u306b\u518d\u8d77\u52d5\u30fb\u518d\u4f5c\u6210\u3055\u308c\u308b\u305f\u3081\u3001Pod\u306b\u76f4\u63a5\u30a2\u30af\u30bb\u30b9\u3059\u308b\u306e\u306f\u4e0d\u5b89\u5b9a\u3067\u3059\u3002\u307e\u305f\u3001Pod\u306f\u30af\u30e9\u30b9\u30bf\u30fc\u5185\u90e8\u3067\u3057\u304b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u305b\u3093\u3002\u305d\u3053\u3067\u3001<\/p>\n\n\n\n<ul>\n<li><strong>Service<\/strong>\u3092\u4f7f\u3063\u3066\u5b89\u5b9a\u3057\u305f\u300c\u540d\u524d\u4ed8\u304d\u30a2\u30af\u30bb\u30b9\u53e3\u300d\u3092\u7528\u610f\u3057\u3001<\/li>\n\n\n\n<li><strong>Ingress<\/strong>\u3092\u4f7f\u3063\u3066\u5916\u90e8\u304b\u3089\u306eHTTP\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u30eb\u30fc\u30eb\u306b\u5f93\u3063\u3066\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83e\udded \u5168\u4f53\u30a4\u30e1\u30fc\u30b8\u56f3<\/h3>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-css\" data-lang=\"CSS\"><code>[ \u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8 ]\n       \u2193\uff08HTTP\uff09\n   [ Ingress Controller ]\n       \u2193\uff08\u30eb\u30fc\u30eb\u306b\u5f93\u3063\u3066\u632f\u308a\u5206\u3051\uff09\n   [ Service ]\n       \u2193\uff08Pod\u306e\u524d\u6bb5\uff09\n   [ Pod\uff08\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\uff09 ]<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83e\uddf1 Service\u3068\u306f\uff1f<\/h3>\n\n\n\n<p>Service\u306f\u3001<strong>Pod\u306e\u524d\u306b\u7acb\u3064&#8221;\u7a93\u53e3&#8221;\u306e\u3088\u3046\u306a\u3082\u306e<\/strong>\u3067\u3059\u3002Pod\u306fIP\u304c\u5909\u308f\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u304c\u3001Service\u306f\u56fa\u5b9a\u540d\uff08DNS\u540d\uff09\u3067\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305f\u3068\u3048\u3070\u6b21\u306e\u3088\u3046\u306aService\u3092\u4f5c\u308b\u3068\u3001<code>springboot-service<\/code>\u3068\u3044\u3046\u540d\u524d\u3067Pod\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\uff1a<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-html\" data-lang=\"HTML\" data-show-lang=\"0\"><code>apiVersion: v1\nkind: Service\nmetadata:\n  name: springboot-service\nspec:\n  selector:\n    app: springboot\n  ports:\n    - port: 80\n      targetPort: 8080\n  type: ClusterIP<\/code><\/pre><\/div>\n\n\n\n<ul>\n<li><code>selector<\/code>\uff1a\u5bfe\u8c61\u3068\u306a\u308bPod\u306e\u30e9\u30d9\u30eb<\/li>\n\n\n\n<li><code>port<\/code>\uff1aService\u304c\u53d7\u3051\u53d6\u308b\u30dd\u30fc\u30c8\u756a\u53f7<\/li>\n\n\n\n<li><code>targetPort<\/code>\uff1aPod\u306e\u4e2d\u3067\u30a2\u30d7\u30ea\u304c\u5f85\u3061\u53d7\u3051\u3066\u3044\u308b\u30dd\u30fc\u30c8<\/li>\n<\/ul>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p><code>type: ClusterIP<\/code>\u306f\u30af\u30e9\u30b9\u30bf\u30fc\u5185\u90e8\u5c02\u7528\u3002\u5916\u90e8\u516c\u958b\u306b\u306f <code>NodePort<\/code> \u3084 <code>LoadBalancer<\/code> \u3082\u3042\u308b\u304c\u3001\u4eca\u56de\u306fIngress\u3067\u5236\u5fa1\u3059\u308b\u305f\u3081 <code>ClusterIP<\/code> \u306e\u307e\u307e\u3067OK\u3067\u3059\u3002<\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83c\udf00 Ingress\u3068\u306f\uff1f<\/h3>\n\n\n\n<p>Ingress\u306f\u3001**\u300cHTTP\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u3069\u306eService\u306b\u6e21\u3059\u304b\u300d**\u3092\u5b9a\u7fa9\u3059\u308b\u30eb\u30fc\u30eb\u96c6\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-html\" data-lang=\"HTML\" data-show-lang=\"0\"><code>apiVersion: networking.k8s.io\/v1\nkind: Ingress\nmetadata:\n  name: springboot-ingress\n  annotations:\n    nginx.ingress.kubernetes.io\/rewrite-target: \/\nspec:\n  rules:\n    - host: myapp.local\n      http:\n        paths:\n          - path: \/\n            pathType: Prefix\n            backend:\n              service:\n                name: springboot-service\n                port:\n                  number: 80<\/code><\/pre><\/div>\n\n\n\n<p>\u30dd\u30a4\u30f3\u30c8\uff1a<\/p>\n\n\n\n<ul>\n<li><code>host<\/code>: \u30c9\u30e1\u30a4\u30f3\u540d\uff08\u305f\u3068\u3048\u3070 <code>myapp.local<\/code>\uff09<\/li>\n\n\n\n<li><code>path<\/code>: URL\u30d1\u30b9\uff08<code>\/api<\/code> \u306a\u3069\u3082\u53ef\uff09<\/li>\n\n\n\n<li><code>backend<\/code>: \u5bfe\u5fdc\u3059\u308bService\u540d\u3068\u30dd\u30fc\u30c8<\/li>\n<\/ul>\n\n\n\n<p>\u3053\u306e\u8a2d\u5b9a\u3092\u3059\u308b\u3068\u3001<code>http:\/\/myapp.local\/<\/code> \u3078\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u304c <code>springboot-service<\/code> \u7d4c\u7531\u3067Pod\u306b\u5c4a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u2699\ufe0f Ingress Controller\u304c\u5fc5\u8981<\/h3>\n\n\n\n<p>Ingress\u306f\u300c\u30eb\u30fc\u30eb\u300d\u3060\u3051\u306a\u306e\u3067\u3001\u5b9f\u969b\u306e\u51e6\u7406\u306f <strong>Ingress Controller<\/strong> \u304c\u884c\u3044\u307e\u3059\u3002\u3088\u304f\u4f7f\u308f\u308c\u308b\u306e\u306f\uff1a<\/p>\n\n\n\n<ul>\n<li><strong>NGINX Ingress Controller<\/strong><\/li>\n\n\n\n<li><strong>Traefik<\/strong><\/li>\n\n\n\n<li><strong>Cloud Load Balancer (\u30af\u30e9\u30a6\u30c9\u7279\u5316\u578b)<\/strong><\/li>\n<\/ul>\n\n\n\n<p>Minikube\u3092\u4f7f\u3063\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u3067 NGINX Ingress Controller \u3092\u6709\u52b9\u5316\u3067\u304d\u307e\u3059\uff1a<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>minikube addons enable ingress<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udd01 Service\u3068Ingress\u306e\u5f79\u5272\u307e\u3068\u3081<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>\u5f79\u5272<\/th><th>\u5bfe\u8c61<\/th><th>\u7528\u9014<\/th><\/tr><\/thead><tbody><tr><td>Service<\/td><td>\u5185\u90e8<\/td><td>Pod\u9593\u901a\u4fe1\u30fb\u5185\u90e8\u30ed\u30fc\u30c9\u30d0\u30e9\u30f3\u30b9<\/td><\/tr><tr><td>Ingress<\/td><td>\u5916\u90e8<\/td><td>\u30c9\u30e1\u30a4\u30f3\uff0b\u30d1\u30b9\u30d9\u30fc\u30b9\u306e\u5916\u90e8\u516c\u958b<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udca1 Tips<\/h3>\n\n\n\n<ul>\n<li>\u8907\u6570\u30a2\u30d7\u30ea\u306e\u516c\u958b\u3082\u53ef\u80fd\u3067\u3059\uff08<code>\/app1<\/code>, <code>\/app2<\/code>\u306a\u3069\u3067\u632f\u308a\u5206\u3051\uff09<\/li>\n\n\n\n<li>HTTPS\u3082Ingress\u3067\u5bfe\u5fdc\u53ef\u80fd\uff08Let&#8217;s Encrypt\u9023\u643a\u306a\u3069\uff09<\/li>\n\n\n\n<li>Ingress\u3068Service\u3092\u9023\u643a\u3059\u308b\u3053\u3068\u3067\u3001<strong>Pod\u306eIP\u5909\u5316\u306b\u5f37\u3044\u69cb\u6210<\/strong>\u304c\u4f5c\u308c\u307e\u3059<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83e\uddea \u52d5\u4f5c\u78ba\u8a8d\u306e\u4f8b<\/h3>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>kubectl get ingress<\/code><\/pre><\/div>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>curl -H &quot;Host: myapp.local&quot; http:\/\/&lt;minikube-ip&gt;\/<\/code><\/pre><\/div>\n\n\n\n<p>\u203b <code>\/etc\/hosts<\/code> \u306b <code>myapp.local<\/code> \u306e\u8a2d\u5b9a\u3092\u8ffd\u52a0\u3059\u308c\u3070\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u30a2\u30af\u30bb\u30b9\u3082\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udce6 \u307e\u3068\u3081<\/h3>\n\n\n\n<ul>\n<li>Service\u306fPod\u306e\u524d\u306b\u7acb\u3064\u5185\u90e8\u306e\u30b2\u30fc\u30c8<\/li>\n\n\n\n<li>Ingress\u306f\u5916\u90e8\u304b\u3089\u306eHTTP\u30a2\u30af\u30bb\u30b9\u3092Service\u306b\u632f\u308a\u5206\u3051\u308b\u30eb\u30fc\u30eb<\/li>\n\n\n\n<li>Minikube\u3084\u30af\u30e9\u30a6\u30c9\u3067\u306fIngress Controller\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5fc5\u8981<\/li>\n<\/ul>\n\n\n\n<p>\u3053\u308c\u3092\u62bc\u3055\u3048\u308c\u3070\u3001Kubernetes\u4e0a\u306eWeb\u30a2\u30d7\u30ea\u3092\u300c\u30e6\u30fc\u30b6\u30fc\u304c\u4f7f\u3048\u308b\u72b6\u614b\u300d\u3067\u904b\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\uff01<\/p>\n\n\n\n<p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55],"tags":[56],"_links":{"self":[{"href":"https:\/\/itstudy365.com\/blog\/wp-json\/wp\/v2\/posts\/1297"}],"collection":[{"href":"https:\/\/itstudy365.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itstudy365.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itstudy365.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itstudy365.com\/blog\/wp-json\/wp\/v2\/comments?post=1297"}],"version-history":[{"count":2,"href":"https:\/\/itstudy365.com\/blog\/wp-json\/wp\/v2\/posts\/1297\/revisions"}],"predecessor-version":[{"id":1403,"href":"https:\/\/itstudy365.com\/blog\/wp-json\/wp\/v2\/posts\/1297\/revisions\/1403"}],"wp:attachment":[{"href":"https:\/\/itstudy365.com\/blog\/wp-json\/wp\/v2\/media?parent=1297"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itstudy365.com\/blog\/wp-json\/wp\/v2\/categories?post=1297"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itstudy365.com\/blog\/wp-json\/wp\/v2\/tags?post=1297"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}