{"id":201,"date":"2026-03-09T18:23:07","date_gmt":"2026-03-09T18:23:07","guid":{"rendered":"https:\/\/blog.rebalai.com\/ja\/2026\/03\/09\/docker-compose-vs-kubernetes-when-to-use-which-in\/"},"modified":"2026-03-09T22:00:15","modified_gmt":"2026-03-09T22:00:15","slug":"docker-compose-vs-kubernetes-when-to-use-which-in","status":"publish","type":"post","link":"https:\/\/blog.rebalai.com\/ja\/2026\/03\/09\/docker-compose-vs-kubernetes-when-to-use-which-in\/","title":{"rendered":"Docker Compose\u3068Kubernetes\u30012026\u5e74\u306b\u3069\u3063\u3061\u3092\u9078\u3076\u304b\u6b63\u76f4\u306b\u8a71\u3059"},"content":{"rendered":"<p>\u53bb\u5e74\u306e9\u6708\u3001\u30c1\u30fc\u30e0\u3067\u300c\u305d\u308d\u305d\u308dKubernetes\u79fb\u884c\u3059\u308b\u304b\u300d\u3068\u3044\u3046\u8a71\u304c\u51fa\u305f\u30023\u4eba\u306e\u30a8\u30f3\u30b8\u30cb\u30a2\u3067\u52d5\u304b\u3057\u3066\u3044\u308bB2B SaaS\u3067\u3001\u5f53\u6642\u306fDocker Compose + EC2\u3067\u5168\u7136\u666e\u901a\u306b\u52d5\u3044\u3066\u3044\u305f\u3093\u3060\u304c\u3001\u7af6\u5408\u4ed6\u793e\u304c\u30d6\u30ed\u30b0\u3067\u300c\u3046\u3061\u306fGKE\u3067\u52d5\u3044\u3066\u307e\u3059\u300d\u3068\u66f8\u3044\u3066\u3044\u3066\u3001\u306a\u3093\u3068\u306a\u304f\u7126\u3063\u305f\u611f\u3058\u306b\u306a\u3063\u305f\u306e\u304c\u304d\u3063\u304b\u3051\u3060\u3002\u5b8c\u5168\u306b\u305d\u308c\u3060\u3051\u3002<\/p>\n<p>2\u9031\u9593\u3001\u672c\u756a\u76f8\u5f53\u306e\u74b0\u5883\u3092\u4e21\u65b9\u3067\u69cb\u7bc9\u3057\u3066\u691c\u8a3c\u3057\u305f\u3002\u30c1\u30fc\u30e0\u306e3\u4eba\u304c\u5168\u54e1\u300cK8s\u3088\u304f\u308f\u304b\u3089\u3093\u300d\u3068\u3044\u3046\u72b6\u614b\u304b\u3089\u59cb\u3081\u305f\u306e\u3067\u3001\u76f8\u5f53\u3057\u3093\u3069\u304b\u3063\u305f\u3002\u6700\u7d42\u7684\u306b\u51fa\u3057\u305f\u7d50\u8ad6\u306f\u300c\u3046\u3061\u306b\u306f\u307e\u3060\u8981\u3089\u306a\u3044\u300d\u3060\u3063\u305f\u3093\u3060\u304c\u3001\u305d\u306e\u5224\u65ad\u306b\u81f3\u308b\u30d7\u30ed\u30bb\u30b9\u304c\u4e00\u756a\u4fa1\u5024\u304c\u3042\u3063\u305f\u3068\u601d\u3063\u3066\u3044\u308b\u3002\u305d\u306e\u4e2d\u3067\u898b\u3048\u3066\u304d\u305f\u30c8\u30ec\u30fc\u30c9\u30aa\u30d5\u3092\u3001\u3067\u304d\u308b\u3060\u3051\u5177\u4f53\u7684\u306b\u66f8\u304f\u3002<\/p>\n<h2>Docker Compose\u304c\u300c\u5d29\u308c\u59cb\u3081\u308b\u300d\u306e\u306f\u3069\u306e\u77ac\u9593\u304b<\/h2>\n<p>\u6b63\u76f4\u3001\u6700\u521d\u306f\u300cDocker Compose\u3067\u4f55\u304c\u60aa\u3044\u3093\u3060\u300d\u3068\u3044\u3046\u7acb\u5834\u3060\u3063\u305f\u3002<\/p>\n<p>\u3046\u3061\u306e\u30b9\u30bf\u30c3\u30af\uff1aNext.js\u30d5\u30ed\u30f3\u30c8\u3001FastAPI\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u3001PostgreSQL\u3001Redis\u3001\u305d\u308c\u304b\u3089\u6700\u8fd1\u8ffd\u52a0\u3057\u305fLLM\u547c\u3073\u51fa\u3057\u7528\u306e\u975e\u540c\u671f\u30ef\u30fc\u30ab\u30fc\uff08Celery\uff09\u3002\u5168\u90e8Compose\u3067\u52d5\u3044\u3066\u3044\u3066\u3001\u30c7\u30d7\u30ed\u30a4\u306fGitHub Actions\u304b\u3089SSH\u3067EC2\u306b\u5165\u3063\u3066 <code>docker compose up -d<\/code> \u3059\u308b\u3060\u3051\u3002\u30b7\u30f3\u30d7\u30eb\u6975\u307e\u308a\u306a\u3044\u3002<\/p>\n<pre><code class=\"language-yaml\"># docker-compose.prod.yml\uff08\u5f53\u6642\u306e\u5b9f\u969b\u306e\u3084\u3064\u3001\u5c11\u3057\u7701\u7565\uff09\nversion: &quot;3.9&quot;\nservices:\n  api:\n    image: ${ECR_REGISTRY}\/myapp-api:${IMAGE_TAG}\n    environment:\n      - DATABASE_URL=${DATABASE_URL}\n      - REDIS_URL=redis:\/\/redis:6379\n    depends_on:\n      db:\n        condition: service_healthy\n    restart: unless-stopped\n\n  worker:\n    image: ${ECR_REGISTRY}\/myapp-api:${IMAGE_TAG}\n    command: celery -A app.worker worker --loglevel=info -c 4\n    environment:\n      - DATABASE_URL=${DATABASE_URL}\n      - REDIS_URL=redis:\/\/redis:6379\n    restart: unless-stopped\n\n  redis:\n    image: redis:7.2-alpine\n    volumes:\n      - redis_data:\/data\n    restart: unless-stopped\n\n  db:\n    image: postgres:16\n    volumes:\n      - pg_data:\/var\/lib\/postgresql\/data\n    healthcheck:\n      test: [&quot;CMD-SHELL&quot;, &quot;pg_isready -U postgres&quot;]\n      interval: 5s\n      timeout: 5s\n      retries: 5\n    restart: unless-stopped\n<\/code><\/pre>\n<p>1\u5e74\u534a\u3001\u7279\u306b\u5927\u304d\u306a\u554f\u984c\u306f\u306a\u304b\u3063\u305f\u3002<\/p>\n<p>\u5d29\u308c\u59cb\u3081\u305f\u306e\u306f\u30ef\u30fc\u30ab\u30fc\u306e\u8ca0\u8377\u304c\u6025\u5897\u3057\u305f\u30bf\u30a4\u30df\u30f3\u30b0\u3060\u3063\u305f\u3002LLM\u51e6\u7406\u30b8\u30e7\u30d6\u304c\u5897\u3048\u3066\u3001\u30b3\u30f3\u30ab\u30ec\u30f3\u30c8\u30ef\u30fc\u30ab\u30fc\u3092\u5897\u3084\u3057\u305f\u3044\u5834\u9762\u304c\u51fa\u3066\u304d\u305f\u3002\u3067\u3082EC2\u306f1\u53f0\u3057\u304b\u306a\u3044\u3002<code>--scale worker=2<\/code> \u306f\u3067\u304d\u308b\u304c\u3001\u305d\u308c\u306f\u540c\u3058EC2\u306e\u4e2d\u3067\u306e\u8a71\u3067\u3001\u5225\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u5206\u6563\u3055\u305b\u3088\u3046\u3068\u3059\u308b\u3068\u9014\u7aef\u306b\u8907\u96d1\u306b\u306a\u308b\u2014\u2014Compose\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3001\u30dc\u30ea\u30e5\u30fc\u30e0\u306e\u5171\u6709\u3001\u30c7\u30d7\u30ed\u30a4\u306e\u9806\u756a\u3001\u5168\u90e8\u624b\u52d5\u3067\u9762\u5012\u3092\u898b\u308b\u3053\u3068\u306b\u306a\u308b\u3002<\/p>\n<p>\u3082\u3046\u4e00\u500b\u56f0\u3063\u305f\u306e\u304c\u30bc\u30ed\u30c0\u30a6\u30f3\u30bf\u30a4\u30e0\u30c7\u30d7\u30ed\u30a4\u3002<code>docker compose up -d<\/code> \u306f\u65e2\u5b58\u30b3\u30f3\u30c6\u30ca\u3092\u6b62\u3081\u3066\u304b\u3089\u65b0\u3057\u3044\u306e\u3092\u8d77\u52d5\u3059\u308b\u306e\u3067\u3001\u6570\u79d2\u30c0\u30a6\u30f3\u3059\u308b\u3002\u6df1\u591c\u306a\u3089\u8a31\u5bb9\u3067\u304d\u308b\u3051\u3069\u3001\u663c\u9593\u306b\u300c\u3061\u3087\u3063\u3068\u4fee\u6b63\u5165\u308c\u307e\u3059\u300d\u3068Slack\u306b\u66f8\u3044\u3066\u304b\u3089\u30c7\u30d7\u30ed\u30a4\u3059\u308b\u305f\u3073\u306b\u5f71\u97ff\u304c\u51fa\u308b\u3002SaaS\u3067\u305d\u308c\u306f\u5730\u5473\u306b\u3057\u3093\u3069\u3044\u3002<\/p>\n<p>\u305f\u3060\u3001\u3053\u308c\u3092\u300cK8s\u304c\u5fc5\u8981\u306a\u30b5\u30a4\u30f3\u300d\u3068\u5373\u65ad\u3059\u308b\u306e\u306f\u65e9\u3044\u3001\u3068\u3044\u3046\u306e\u304c\u4eca\u306e\u4ffa\u306e\u898b\u89e3\u3060\u3002\u5b9f\u306f\u3053\u306e2\u3064\u306e\u554f\u984c\u3001K8s\u306a\u3057\u3067\u3082\u89e3\u6c7a\u3067\u304d\u308b\u3002\u305d\u308c\u306f\u5f8c\u3067\u8a71\u3059\u3002<\/p>\n<p><strong>\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u306e\u6559\u8a13\uff1a<\/strong> \u300cCompose\u304c\u9650\u754c\u300d\u306b\u898b\u3048\u308b\u554f\u984c\u306e\u591a\u304f\u306f\u3001Compose\u56fa\u6709\u306e\u554f\u984c\u3058\u3083\u306a\u304f\u300cEC2 1\u53f0 + \u624b\u52d5\u30c7\u30d7\u30ed\u30a4\u300d\u306e\u554f\u984c\u3060\u3002\u5207\u308a\u5206\u3051\u3066\u304b\u3089\u5224\u65ad\u3057\u305f\u65b9\u304c\u3044\u3044\u3002<\/p>\n<h2>Kubernetes\u304c\u4fa1\u5024\u3092\u51fa\u3059\u306e\u306f\u300c\u30b9\u30b1\u30fc\u30eb\u300d\u3058\u3083\u306a\u304f\u300c\u904b\u7528\u81ea\u52d5\u5316\u306e\u7d44\u307f\u5408\u308f\u305b\u300d<\/h2>\n<p>K8s\u3092\u691c\u8a0e\u3057\u59cb\u3081\u3066\u6700\u521d\u306b\u671f\u5f85\u3057\u3066\u3044\u305f\u306e\u306f\u3001\u300c\u30b9\u30b1\u30fc\u30eb\u30a2\u30a6\u30c8\u304c\u697d\u306b\u306a\u308b\u300d\u3053\u3068\u3060\u3063\u305f\u3002\u305d\u308c\u306f\u534a\u5206\u3057\u304b\u6b63\u3057\u304f\u306a\u304b\u3063\u305f\u3002<\/p>\n<p>\u6b63\u78ba\u306b\u8a00\u3046\u3068\u3001K8s\u306e\u5f37\u3055\u306fHPA\uff08Horizontal Pod Autoscaler\uff09\u306b\u3088\u308b\u30aa\u30fc\u30c8\u30b9\u30b1\u30fc\u30eb\u3082\u305d\u3046\u3060\u304c\u3001\u305d\u308c\u4ee5\u4e0a\u306b\u300c\u81ea\u5df1\u4fee\u5fa9\u300d\u300c\u30ed\u30fc\u30ea\u30f3\u30b0\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u300d\u300c\u30ea\u30bd\u30fc\u30b9\u5236\u9650\u300d\u304c\u7d44\u307f\u5408\u308f\u3055\u3063\u305f\u3068\u304d\u306b\u51fa\u3066\u304f\u308b\u3068\u601d\u3046\u3002\u3069\u308c\u304b1\u3064\u3060\u3051\u53d6\u308b\u3068\u300cECS\u3067\u3082\u3067\u304d\u308b\u3058\u3083\u3093\u300d\u3068\u3044\u3046\u8a71\u306b\u306a\u308b\u3002<\/p>\n<pre><code class=\"language-yaml\"># K8s\u306eworker deployment\uff08\u691c\u8a3c\u3067\u4f5c\u3063\u305f\u3084\u3064\uff09\napiVersion: apps\/v1\nkind: Deployment\nmetadata:\n  name: celery-worker\nspec:\n  replicas: 2\n  selector:\n    matchLabels:\n      app: celery-worker\n  strategy:\n    type: RollingUpdate\n    rollingUpdate:\n      maxSurge: 1\n      maxUnavailable: 0  # \u3053\u3053\u304c\u30bc\u30ed\u30c0\u30a6\u30f3\u30bf\u30a4\u30e0\u306e\u30ad\u30e2\n  template:\n    metadata:\n      labels:\n        app: celery-worker\n    spec:\n      containers:\n      - name: worker\n        image: myapp-api:latest\n        command: [&quot;celery&quot;, &quot;-A&quot;, &quot;app.worker&quot;, &quot;worker&quot;, &quot;--loglevel=info&quot;]\n        resources:\n          requests:\n            memory: &quot;512Mi&quot;\n            cpu: &quot;250m&quot;\n          limits:\n            memory: &quot;1Gi&quot;\n            cpu: &quot;1000m&quot;\n---\napiVersion: autoscaling\/v2\nkind: HorizontalPodAutoscaler\nmetadata:\n  name: celery-worker-hpa\nspec:\n  scaleTargetRef:\n    apiVersion: apps\/v1\n    kind: Deployment\n    name: celery-worker\n  minReplicas: 2\n  maxReplicas: 10\n  metrics:\n  - type: Resource\n    resource:\n      name: cpu\n      target:\n        type: Utilization\n        averageUtilization: 70\n<\/code><\/pre>\n<p>\u3053\u308c\u3092\u898b\u3066\u300c\u4fbf\u5229\u3058\u3083\u306a\u3044\u304b\u300d\u3068\u601d\u3063\u305f\u306e\u306f\u6b63\u76f4\u3060\u3002CPU\u4f7f\u7528\u7387\u304c70%\u3092\u8d85\u3048\u305f\u3089\u30ef\u30fc\u30ab\u30fc\u304c\u81ea\u52d5\u3067\u5897\u3048\u308b\u3002\u591c\u4e2d\u306b\u6025\u306b\u30b8\u30e7\u30d6\u304c\u7a4d\u307e\u308c\u3066\u3082\u5bfe\u5fdc\u3067\u304d\u308b\u2014\u2014\u306f\u305a\u3060\u3063\u305f\u3002<\/p>\n<p>\u3053\u3053\u3067\u4e88\u60f3\u5916\u306e\u3053\u3068\u304c\u8d77\u304d\u305f\u3002<\/p>\n<p>HPA\u304c\u53cd\u5fdc\u3059\u308b\u306e\u306f\u300cCPU\u304c\u4e0a\u304c\u3063\u3066\u304b\u3089\u300d\u306a\u306e\u3067\u3001Redis\u306e\u30b8\u30e7\u30d6\u30ad\u30e5\u30fc\u306b\u30bf\u30b9\u30af\u304c\u7a4d\u307e\u308c\u3066\u304b\u3089\u30ef\u30fc\u30ab\u30fc\u304c\u5897\u3048\u308b\u307e\u30672\u301c4\u5206\u304b\u304b\u308b\u3002\u3046\u3061\u306eLLM\u51e6\u7406\u30b8\u30e7\u30d6\u306f1\u4ef6\u3042\u305f\u308a30\u301c60\u79d2\u304b\u304b\u308b\u306e\u3067\u3001\u3053\u306e\u9045\u5ef6\u304c\u601d\u3063\u305f\u3088\u308a\u75db\u304b\u3063\u305f\u3002KEDA\uff08Kubernetes Event-Driven Autoscaler\uff09\u3092\u4f7f\u3048\u3070Redis\u306e\u30ad\u30e5\u30fc\u9577\u3067\u30b9\u30b1\u30fc\u30eb\u3067\u304d\u308b\u3093\u3060\u304c\u3001\u305d\u308c\u306f\u307e\u305f\u5225\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u8a2d\u5b9a\u304c\u5fc5\u8981\u3067\u2014\u2014\u300cK8s\u3067\u697d\u306b\u306a\u308b\u300d\u3068\u3044\u3046\u8a71\u304c\u3069\u3093\u3069\u3093\u8907\u96d1\u306a\u65b9\u5411\u306b\u5e83\u304c\u3063\u3066\u3044\u304f\u611f\u3058\u3002\u30d0\u30c3\u30c1\u51e6\u7406\u7cfb\u306eJob API\u306f\u6700\u8fd1\u306eK8s\u3067\u3060\u3044\u3076\u6539\u5584\u3055\u308c\u3066\u3044\u308b\u304c\u3001\u305d\u308c\u3067\u3082KEDA\u7b49\u306e\u8ffd\u52a0\u30c4\u30fc\u30eb\u304c\u5fc5\u8981\u306a\u5834\u9762\u306f\u4f9d\u7136\u3068\u3057\u3066\u591a\u3044\u3002<\/p>\n<p>So\u3001K8s\u304c\u672c\u5f53\u306b\u5149\u308b\u306e\u306f\uff1a\u8907\u6570\u30c1\u30fc\u30e0\u304c\u8907\u6570\u30b5\u30fc\u30d3\u30b9\u3092\u72ec\u7acb\u3057\u3066\u30c7\u30d7\u30ed\u30a4\u3057\u3066\u3044\u308b\u74b0\u5883\u3001SLA\u304c\u53b3\u3057\u304f\u3066\u5e38\u6642\u53ef\u7528\u6027\u304c\u6c42\u3081\u3089\u308c\u308b\u5834\u5408\u3001\u30a4\u30f3\u30d5\u30e9\u30a8\u30f3\u30b8\u30cb\u30a2\u304c\u5c02\u4efb\u3067\u3044\u308b\u5834\u5408\u2014\u2014\u3053\u306e\u6761\u4ef6\u304c\u63c3\u3063\u305f\u3068\u304d\u3060\u3068\u601d\u3046\u30021\u301c2\u500b\u3060\u3068\u300c\u305d\u306e\u5206\u306e\u30b3\u30b9\u30c8\u306b\u898b\u5408\u3046\u304b\u300d\u3068\u3044\u3046\u8a71\u306b\u306a\u308b\u3002<\/p>\n<h2>\u8ab0\u3082\u6b63\u76f4\u306b\u8a71\u3055\u306a\u3044Kubernetes\u306e\u300c\u96a0\u308c\u305f\u30b3\u30b9\u30c8\u300d<\/h2>\n<p>K8s\u306e\u6280\u8853\u7684\u306a\u30e1\u30ea\u30c3\u30c8\u3092\u66f8\u3044\u305f\u8a18\u4e8b\u306f\u5c71\u307b\u3069\u3042\u308b\u304c\u3001\u30b3\u30b9\u30c8\u306b\u3064\u3044\u3066\u5177\u4f53\u7684\u306b\u66f8\u3044\u3066\u3042\u308b\u3082\u306e\u306f\u5c11\u306a\u3044\u3002\u4ffa\u304c\u5b9f\u969b\u306b\u8a08\u7b97\u3057\u305f\u6570\u5b57\u3092\u66f8\u304f\u3002<\/p>\n<p>GKE\uff08Google Kubernetes Engine\uff09\u3067n2-standard-4\u306e\u30ce\u30fc\u30c9\u30923\u53f0\uff08\u6700\u5c0f\u69cb\u6210\uff09\u52d5\u304b\u3059\u3068\u3001\u6708\u7d04$450\u3002EKS\u3060\u3068\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30d7\u30ec\u30fc\u30f3\u3060\u3051\u3067\u6708$73\u3001\u30ce\u30fc\u30c9\u8fbc\u307f\u3067\u4f3c\u305f\u3088\u3046\u306a\u91d1\u984d\u306b\u306a\u308b\u3002\u3046\u3061\u304c\u5f53\u6642\u6255\u3063\u3066\u3044\u305fEC2\uff08m5.xlarge 1\u53f0 + RDS t3.medium\uff09\u306f\u6708\u7d04$185\u3002\u5dee\u984d\u3067\u6708$265\u3001\u5e74\u9593$3,180\u30023\u4eba\u30c1\u30fc\u30e0\u306e\u30b9\u30bf\u30fc\u30c8\u30a2\u30c3\u30d7\u306b\u3068\u3063\u3066\u3001\u3053\u308c\u306f\u7121\u8996\u3067\u304d\u306a\u3044\u6570\u5b57\u3060\u3002<\/p>\n<p>\u91d1\u984d\u3060\u3051\u3058\u3083\u306a\u304f\u3066\u3001K8s\u3092\u300c\u3061\u3083\u3093\u3068\u52d5\u304b\u3059\u300d\u305f\u3081\u306b\u5fc5\u8981\u306a\u5468\u8fba\u30c4\u30fc\u30eb\u306e\u91cf\u304c\u60f3\u50cf\u4ee5\u4e0a\u3060\u3063\u305f\u3002Helm\u3001cert-manager\u3001ingress-nginx\u3001Prometheus + Grafana\u3001ArgoCD\u2014\u2014\u3053\u308c\u3089\u306f\u300cK8s\u3092\u4f7f\u3046\u300d\u306a\u3089\u4e8b\u5b9f\u4e0a\u5fc5\u9808\u306b\u8fd1\u3044\u3002\u5168\u90e8\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3059\u308b\u306e\u306b2\u9031\u9593\u304b\u304b\u3063\u305f\u3057\u3001\u4f55\u304b\u304c\u58ca\u308c\u305f\u3068\u304d\u306b\u539f\u56e0\u3092\u7279\u5b9a\u3059\u308b\u306e\u304c\u672c\u5f53\u306b\u96e3\u3057\u3044\u3002<\/p>\n<p>\u5b9f\u969b\u306b\u3084\u3089\u304b\u3057\u305f\u8a71\u3092\u3059\u308b\u3002\u91d1\u66dc\u306e\u5348\u5f8c\u306bingress-nginx\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u4e0a\u3052\u305f\u3089\uff081.11.x \u2192 1.12.x\uff09\u3001TLS termination\u306e\u6319\u52d5\u304c\u5909\u308f\u3063\u3066\u3044\u3066\u672c\u756a\u306eHTTPS\u304c\u7a81\u7136503\u3092\u8fd4\u3057\u59cb\u3081\u305f\u3002\u6c17\u3065\u3044\u305f\u306e\u304c\u5915\u65b95\u6642\u3067\u3001\u539f\u56e0\u7279\u5b9a\u306b2\u6642\u9593\u304b\u304b\u3063\u305f\u3002Compose\u3060\u3063\u305f\u3089\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u30921\u3064\u898b\u308c\u3070\u7d42\u308f\u308b\u8a71\u304c\u3001K8s\u3060\u3068ConfigMap\u3001Secret\u3001Ingress\u3001Service\u3001Deployment\u5168\u90e8\u3092\u8ffd\u3063\u3066\u3044\u304f\u5fc5\u8981\u304c\u3042\u308b\u3002\u305d\u308c\u81ea\u4f53\u306f\u4ed5\u65b9\u306a\u3044\u3093\u3060\u304c\u3001\u300c\u4f55\u304c\u5909\u308f\u3063\u305f\u304b\u300d\u3092\u628a\u63e1\u3059\u308b\u305f\u3081\u306e\u8a8d\u77e5\u8ca0\u8377\u304c\u3001Compose\u306e\u6bd4\u3058\u3083\u306a\u3044\u3002<\/p>\n<p>\u4e00\u65b9\u3067\u3001Compose\u306e\u30b3\u30b9\u30c8\u306b\u3082\u96a0\u308c\u305f\u3082\u306e\u304c\u3042\u308b\u3002EC2\u304c1\u53f0\u3060\u3068SPOF\uff08\u5358\u4e00\u969c\u5bb3\u70b9\uff09\u306b\u306a\u308b\u3002\u53ef\u7528\u6027\u3092\u4e0a\u3052\u308b\u305f\u3081\u306bALB + Auto Scaling Group\u3092\u8ffd\u52a0\u3059\u308b\u3068\u3001\u305d\u308c\u306a\u308a\u306e\u8907\u96d1\u3055\u306f\u51fa\u3066\u304f\u308b\u3002Compose\u304c\u300c\u30b7\u30f3\u30d7\u30eb\u300d\u3067\u3044\u3089\u308c\u308b\u306e\u306f\u3001\u53ef\u7528\u6027\u306e\u8981\u4ef6\u3092\u3042\u308b\u7a0b\u5ea6\u59a5\u5354\u3057\u3066\u3044\u308b\u304b\u3089\u3067\u3082\u3042\u308b\u2014\u2014\u3053\u308c\u306f\u6700\u521d\u306b\u8003\u3048\u3066\u3044\u306a\u304b\u3063\u305f\u30c8\u30ec\u30fc\u30c9\u30aa\u30d5\u3060\u3063\u305f\u3002<\/p>\n<p>\u4eba\u6708\u3067\u8003\u3048\u308b\u3068\uff1aK8s\u306e\u5b66\u7fd2\u3068\u65e5\u5e38\u7684\u306a\u904b\u7528\u306b\u30a8\u30f3\u30b8\u30cb\u30a21\u4eba\u304c\u67082\u301c3\u65e5\u53d6\u3089\u308c\u308b\u306a\u3089\u3001\u305d\u306e\u5206\u306e\u4eba\u4ef6\u8cbb\u306f\u76f8\u5f53\u5927\u304d\u3044\u30023\u4eba\u30c1\u30fc\u30e0\u3067\u8ab0\u304b\u304c2\u301c3\u65e5\u6f70\u308c\u308b\u306e\u306f\u3001\u30b9\u30bf\u30fc\u30c8\u30a2\u30c3\u30d7\u306b\u306f\u672c\u5f53\u306b\u304d\u3064\u3044\u3002<\/p>\n<h2>3\u4eba\u30c1\u30fc\u30e0\u3067\u300cKubernetes\u79fb\u884c\u3057\u306a\u3044\u300d\u3068\u6c7a\u3081\u305f\u7406\u7531<\/h2>\n<p>2\u9031\u9593\u306e\u691c\u8a3c\u304c\u7d42\u308f\u3063\u3066\u3001\u30c1\u30fc\u30e0\u3067\u8a71\u3057\u5408\u3063\u305f\u3002\u7d50\u8ad6\u306f\u300c\u4eca\u3058\u3083\u306a\u3044\u300d\u3060\u3063\u305f\u3002<\/p>\n<p>\u6c7a\u3081\u624b\u306f3\u3064\u3042\u308b\u3002<\/p>\n<p>\u307e\u305a\u3001\u3046\u3061\u306e\u4e00\u756a\u306e\u75db\u307f\u306f\u300c\u30bc\u30ed\u30c0\u30a6\u30f3\u30bf\u30a4\u30e0\u30c7\u30d7\u30ed\u30a4\u304c\u3067\u304d\u306a\u3044\u300d\u3053\u3068\u2014\u2014\u3053\u308c\u306fCompose\u306e\u307e\u307e\u3067\u3082\u89e3\u6c7a\u3067\u304d\u308b\u3002EC2\u3092ALB\u306e\u88cf\u306b2\u53f0\u7f6e\u3044\u3066\u3001Blue-Green\u30c7\u30d7\u30ed\u30a4\u3092\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u5b9f\u88c5\u3057\u305f\u3002\u683c\u597d\u826f\u304f\u306f\u306a\u3044\u3051\u3069\u52d5\u304f\u3002\u30b3\u30b9\u30c8\u306f\u6708$60\u5897\u3048\u308b\u3060\u3051\u3067\u3001K8s\u306b\u79fb\u884c\u3059\u308b\u3088\u308a\u5b89\u3044\u3002<\/p>\n<p>\u30ef\u30fc\u30ab\u30fc\u306e\u30b9\u30b1\u30fc\u30eb\u554f\u984c\u306b\u3064\u3044\u3066\u306f\u3001SQS + ECS Fargate Spot\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3068\u3001K8s\u306a\u3057\u3067\u89e3\u6c7a\u3067\u304d\u308b\u3068\u6c17\u3065\u3044\u305f\u3002Celery\u3092\u305d\u306e\u307e\u307e\u52d5\u304b\u3057\u305f\u3044\u306a\u3089\u3001ECS\u5358\u4f53\u3067\u3082HPA\u306b\u8fd1\u3044\u3053\u3068\u306f\u3067\u304d\u308b\u30022026\u5e74\u6642\u70b9\u3067ECS\u304c\u304b\u306a\u308a\u6210\u719f\u3057\u3066\u3044\u3066\u3001\u300cCompose\u3068K8s\u306e\u4e2d\u9593\u300d\u7684\u306a\u9078\u629e\u80a2\u3068\u3057\u3066\u771f\u5263\u306b\u691c\u8a0e\u3059\u308b\u4fa1\u5024\u304c\u3042\u308b\u2014\u20143\u30f6\u6708\u524d\u306b\u306f\u4ffa\u306e\u9078\u629e\u80a2\u306b\u5165\u3063\u3066\u3044\u306a\u304b\u3063\u305f\u8996\u70b9\u3060\u3002<\/p>\n<p>\u6700\u5f8c\u304c\u4e00\u756a\u6b63\u76f4\u306a\u7406\u7531\u3067\u3001\u30c1\u30fc\u30e0\u306e\u8a8d\u77e5\u8ca0\u8377\u306e\u8a71\u3060\u3002\u4ffa\u306f\u500b\u4eba\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067K8s\u3092\u4f7f\u3063\u3066\u3044\u3066\u3001\u6b63\u76f4\u597d\u304d\u3060\u3002\u3067\u3082\u30c1\u30fc\u30e0\u5168\u54e1\u304c\u30c7\u30d0\u30c3\u30b0\u3067\u304d\u308b\u6280\u8853\u3058\u3083\u306a\u3044\u3068\u3001\u969c\u5bb3\u5bfe\u5fdc\u304c\u4ffa\u4e00\u4eba\u306b\u96c6\u4e2d\u3059\u308b\u3002\u305d\u308c\u306f\u6301\u7d9a\u53ef\u80fd\u3058\u3083\u306a\u3044\u2014\u2014\u3069\u3093\u306a\u306b\u6280\u8853\u7684\u306b\u512a\u308c\u3066\u3044\u3066\u3082\u3002<\/p>\n<p>Anyway\u3001\u30c1\u30fc\u30e0\u304c10\u4eba\u3092\u8d85\u3048\u3066\u3001\u30de\u30a4\u30af\u30ed\u30b5\u30fc\u30d3\u30b9\u304c5\u500b\u4ee5\u4e0a\u306b\u306a\u3063\u305f\u3089K8s\u306e\u8a71\u3092\u307e\u305f\u771f\u5263\u306b\u3059\u308b\u3064\u3082\u308a\u3060\u3002\u3067\u3082\u4eca\u3058\u3083\u306a\u3044\u3002\u300c\u3044\u3064\u304b\u4f7f\u3046\u304b\u3082\u3057\u308c\u306a\u3044\u304b\u3089\u4eca\u899a\u3048\u3066\u304a\u304f\u300d\u3068\u3044\u3046\u767a\u60f3\u3067K8s\u3092\u672c\u756a\u306b\u5165\u308c\u308b\u306e\u306f\u3001\u904b\u7528\u30b3\u30b9\u30c8\u3092\u81ea\u3089\u9ad8\u304f\u3059\u308b\u3060\u3051\u3060\u3068\u601d\u3063\u3066\u3044\u308b\u3002100% sure \u3058\u3083\u306a\u3044\u3051\u3069\u3001\u5c11\u306a\u304f\u3068\u3082\u3046\u3061\u306e\u30d5\u30a7\u30fc\u30ba\u3067\u306f\u305d\u3046\u3060\u3002<\/p>\n<h2>\u7d50\u8ad6\uff1a\u30c1\u30fc\u30e0\u306e\u300c\u6700\u521d\u306e\u75db\u307f\u300d\u304b\u3089\u9006\u7b97\u3057\u3066\u9078\u3079<\/h2>\n<p>\u66d6\u6627\u306a\u7b54\u3048\u306f\u51fa\u3057\u305f\u304f\u306a\u3044\u306e\u3067\u3001\u306f\u3063\u304d\u308a\u66f8\u304f\u3002<\/p>\n<p><strong>Docker Compose\u3092\u9078\u3076\u3079\u304d\u72b6\u6cc1\uff1a<\/strong><br \/>\n&#8211; \u30a8\u30f3\u30b8\u30cb\u30a2\u304c1\u301c5\u4eba\u3067\u3001\u30a4\u30f3\u30d5\u30e9\u5c02\u4efb\u304c\u3044\u306a\u3044<br \/>\n&#8211; \u30b5\u30fc\u30d3\u30b9\u304c1\u3064\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u5185\u306b\u53ce\u307e\u3063\u3066\u3044\u308b<br \/>\n&#8211; \u6708\u9593\u30a2\u30af\u30c6\u30a3\u30d6\u30e6\u30fc\u30b6\u30fc\u304c\u6570\u4e07\u4eba\u898f\u6a21\u4ee5\u4e0b<br \/>\n&#8211; \u4eca\u306e\u75db\u307f\u304c\u300c\u30b9\u30b1\u30fc\u30eb\u300d\u3088\u308a\u300c\u30c7\u30d7\u30ed\u30a4\u306e\u624b\u9593\u300d\u3084\u300c\u958b\u767a\u901f\u5ea6\u300d\u306b\u3042\u308b<\/p>\n<p><strong>Kubernetes\u3092\u9078\u3076\u3079\u304d\u72b6\u6cc1\uff1a<\/strong><br \/>\n&#8211; \u8907\u6570\u30c1\u30fc\u30e0\u304c\u72ec\u7acb\u3057\u3066\u30c7\u30d7\u30ed\u30a4\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\uff08\u3053\u308c\u304c\u4e00\u756a\u91cd\u8981\uff09<br \/>\n&#8211; \u30b5\u30fc\u30d3\u30b9\u304c5\u500b\u4ee5\u4e0a\u3067\u3001\u305d\u308c\u305e\u308c\u7570\u306a\u308b\u30b9\u30b1\u30fc\u30eb\u8981\u4ef6\u304c\u3042\u308b<br \/>\n&#8211; SRE\u304b\u30a4\u30f3\u30d5\u30e9\u30a8\u30f3\u30b8\u30cb\u30a2\u304c\u5c02\u4efb\u3067\u3044\u308b\u3001\u307e\u305f\u306f\u63a1\u7528\u4e88\u5b9a<br \/>\n&#8211; PCI DSS\u3084SOC2\u7b49\u306e\u30b3\u30f3\u30d7\u30e9\u30a4\u30a2\u30f3\u30b9\u8981\u4ef6\u3067K8s\u30a8\u30b3\u30b7\u30b9\u30c6\u30e0\u304c\u524d\u63d0\u306b\u306a\u3063\u3066\u3044\u308b<\/p>\n<p>\u300c\u3046\u3061\u306f\u6210\u9577\u3059\u308b\u4e88\u5b9a\u3060\u304b\u3089K8s\u306b\u3057\u3068\u3053\u3046\u300d\u3068\u3044\u3046\u5224\u65ad\u306f\u3001\u4ffa\u306f\u304a\u52e7\u3081\u3057\u306a\u3044\u3002K8s\u306e\u904b\u7528\u30b3\u30b9\u30c8\u3092\u6255\u3044\u59cb\u3081\u308b\u3068\u3001\u305d\u308c\u3092\u6368\u3066\u308b\u306e\u304c\u96e3\u3057\u304f\u306a\u308b\u3002\u305d\u306e\u6295\u8cc7\u304c\u56de\u53ce\u3067\u304d\u308b\u898f\u6a21\u306b\u306a\u3063\u3066\u304b\u3089\u79fb\u884c\u3059\u308b\u65b9\u304c\u3001\u5b9f\u969b\u306b\u306f\u901f\u3044\u3002\u6280\u8853\u7684\u8ca0\u50b5\u306e\u3088\u3046\u306b\u805e\u3053\u3048\u308b\u304b\u3082\u3057\u308c\u306a\u3044\u304c\u3001\u73fe\u5b9f\u7684\u306a\u8a71\u3068\u3057\u3066\u3001Compose\u304b\u3089\u306e\u79fb\u884c\u306f\u300c\u8f9b\u3044\u300d\u3051\u3069\u300c\u3067\u304d\u306a\u3044\u300d\u3067\u306f\u306a\u3044\u3002<\/p>\n<p>\u3046\u3061\u306f\u4eca\u3082Compose\u3067\u52d5\u304b\u3057\u7d9a\u3051\u3066\u3044\u308b\u304c\u3001\u5f8c\u6094\u306f\u306a\u3044\u3002\u3080\u3057\u308d2\u9031\u9593\u306e\u691c\u8a3c\u3067\u300c\u306a\u305cCompose\u3067\u5341\u5206\u306a\u306e\u304b\u300d\u3092\u8a00\u8a9e\u5316\u3067\u304d\u305f\u3053\u3068\u306e\u65b9\u304c\u3001\u30c1\u30fc\u30e0\u306b\u3068\u3063\u3066\u4fa1\u5024\u304c\u3042\u3063\u305f\u3002\u6b21\u306b\u8ab0\u304b\u304c\u300cK8s\u306b\u3059\u3079\u304d\u3067\u306f\u300d\u3068\u8a00\u3063\u305f\u3068\u304d\u3001\u611f\u899a\u3058\u3083\u306a\u304f\u6839\u62e0\u3067\u7b54\u3048\u3089\u308c\u308b\u3002\u305d\u308c\u3067\u5341\u5206\u3060\u3002<\/p>\n<p><!-- Reviewed: 2026-03-10 | Status: ready_to_publish | Changes: expanded meta_description, sharpened section 2 heading, removed version-specific K8s release claim, moved ingress-nginx story to clearer transition, varied section 4 paragraph openings to break parallel structure, tightened closing sentence --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u53bb\u5e74\u306e9\u6708\u3001\u30c1\u30fc\u30e0\u3067\u300c\u305d\u308d\u305d\u308dKubernetes\u79fb\u884c\u3059\u308b\u304b\u300d\u3068\u3044\u3046\u8a71\u304c\u51fa\u305f\u30023\u4eba\u306e\u30a8\u30f3\u30b8\u30cb\u30a2\u3067\u52d5\u304b\u3057\u3066\u3044\u308bB2B SaaS\u3067\u3001\u5f53\u6642\u306fDocker Compose + EC2\u3067\u5168\u7136\u666e\u901a\u306b\u52d5\u3044\u3066\u3044\u305f\u3093\u3060\u304c\u3001\u7af6\u5408\u4ed6\u793e\u304c\u30d6\u30ed\u30b0\u3067\u300c\u3046\u3061\u306fGKE\u3067\u52d5\u3044\u3066\u307e\u3059\u300d\u3068\u66f8\u3044\u3066\u3044\u3066\u3001\u306a\u3093\u3068\u306a\u304f\u7126\u3063\u305f\u611f\u3058\u306b\u306a\u3063\u305f\u306e\u304c\u304d\u3063\u304b\u3051\u3060\u3002\u5b8c<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-201","post","type-post","status-publish","format-standard","hentry","category-general"],"_links":{"self":[{"href":"https:\/\/blog.rebalai.com\/ja\/wp-json\/wp\/v2\/posts\/201","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.rebalai.com\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.rebalai.com\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.rebalai.com\/ja\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.rebalai.com\/ja\/wp-json\/wp\/v2\/comments?post=201"}],"version-history":[{"count":1,"href":"https:\/\/blog.rebalai.com\/ja\/wp-json\/wp\/v2\/posts\/201\/revisions"}],"predecessor-version":[{"id":212,"href":"https:\/\/blog.rebalai.com\/ja\/wp-json\/wp\/v2\/posts\/201\/revisions\/212"}],"wp:attachment":[{"href":"https:\/\/blog.rebalai.com\/ja\/wp-json\/wp\/v2\/media?parent=201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.rebalai.com\/ja\/wp-json\/wp\/v2\/categories?post=201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.rebalai.com\/ja\/wp-json\/wp\/v2\/tags?post=201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}