[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[],[],null,["# Autoscaling\n\nKf Apps can be automatically scaled based on CPU usage.\nYou can configure autoscaling limits for your Apps and the target CPU usage for\neach App instance. Kf automatically scales your Apps up\nand down in response to demand.\n\nBy default, autoscaling is disabled. Follow the steps below to enable autoscaling.\n\nView Apps\n---------\n\nYou can view the autoscaling status for an App using the `kf apps`\ncommand. If autoscaling is enabled for an App, `Instances` includes the\nautoscaling status. \n\n $ kf apps\n\n Name Instances Memory Disk CPU\n app1 4 (autoscaled 4 to 5) 256Mi 1Gi 100m\n app2 1 256Mi 1Gi 100m\n\nAutoscaling is enabled for `app1` with `min-instances` set to 4 and\n`max-instances` set to 5. Autoscaling is disabled for `app2`.\n\nUpdate autoscaling limits\n-------------------------\n\nYou can update the instance limits using the `kf update-autoscaling-limits`\ncommand. \n\n kf update-autoscaling-limits \u003cvar translate=\"no\"\u003eapp-name\u003c/var\u003e \u003cvar translate=\"no\"\u003emin-instances\u003c/var\u003e \u003cvar translate=\"no\"\u003emax-instances\u003c/var\u003e\n\nCreate autoscaling rule\n-----------------------\n\nYou can create autoscaling rules using the `kf create-autoscaling-rule`\ncommand. \n\n kf create-autoscaling-rule \u003cvar translate=\"no\"\u003eapp-name\u003c/var\u003e CPU \u003cvar translate=\"no\"\u003emin-threshold\u003c/var\u003e \u003cvar translate=\"no\"\u003emax-threshold\u003c/var\u003e\n\nDelete autoscaling rules\n------------------------\n\nYou can delete all autoscaling rules with the\n`kf delete-autoscaling-rule` command. Kf only supports\none autoscaling rule. \n\n kf delete-autoscaling-rules \u003cvar translate=\"no\"\u003eapp-name\u003c/var\u003e\n\nEnable and disable autoscaling\n------------------------------\n\nAutoscaling can be enabled by using `enable-autoscaling` and\ndisabled by using `disable-autoscaling`. When it is disabled, the\nconfigurations, including limits and rules, are preserved. \n\n kf enable-autoscaling \u003cvar translate=\"no\"\u003eapp-name\u003c/var\u003e\n kf disable-autoscaling \u003cvar translate=\"no\"\u003eapp-name\u003c/var\u003e"]]