frbimo
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    --- title: Configure Quality of Service for Pods content_type: task weight: 30 --- # Konfigurasi Quality of Service untuk Pod <!-- overview --> Halaman ini menunjukkan bagaimana mengkonfigurasi Pods agar ditempatkan pada kelas Quality of Service (QoS) khusus. . Kubernetes menggunakan kelas QoS untuk membuat keputusan tentang menjadwalkan dan mengeluarkan Pod. This page shows how to configure Pods so that they will be assigned particular Quality of Service (QoS) classes. Kubernetes uses QoS classes to make decisions about scheduling and evicting Pods. ## {{% heading "prerequisites" %}} {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} <!-- steps --> ## QoS classes Saat Kubernetes membuat Pod, ia menetapkan salah satu kelas QoS berikut ke Pod: * Guaranteed * Burstable * BestEffort ## Create a namespace Buat namespace sehingga *resource* yang Anda buat dalam latihan ini diisolasi dari cluster Anda yang lain. (translate sendiri). ```shell kubectl create namespace qos-example ``` ## Create a Pod that gets assigned a QoS class of Guaranteed Agar Pod memiliki Kelas QoS Guaranteed: * Setiap Container, termasuk init containers, dalam Pod harus memiliki memory limit dan memory request, dan keduanya harus sama. * Setiap Container, termasuk init containers, dalam Pod harus memiliki sebuah CPU limit dan sebuah CPU request, dan keduanya harus sama. // in the Pod must have a memory limit and a memory request, and they must be the same. // * Every Container, including init containers, in the Pod must have a CPU limit and a CPU request, and they must be the same. Berikut adalah file konfigurasi untuk Pod yang memiliki satu Container. Container tersebut memiliki sebuah memory limit dan memory request, keduanya memiliki kapasitas 200MiB. Container tersebut memiliki sebuah CPU limit dan sebuah CPU request, keduanya memiliki kapasitas 700milliCPU: //Here is the configuration file for a Pod that has one Container. The Container has a memory limit and a memory request, both equal to 200 MiB. The Container has a CPU limit and a CPU request, both equal to 700 milliCPU: {{< codenew file="pods/qos/qos-pod.yaml" >}} Membuat Pod: Create the Pod ```shell kubectl apply -f https://k8s.io/examples/pods/qos/qos-pod.yaml --namespace=qos-example ``` Melihat informasi detail mengenai Pod: //View detailed information about the Pod ```shell kubectl get pod qos-demo --namespace=qos-example --output=yaml ``` Hasil menampilkan bahwa Kubernetes memberikan kelas QoS Guaranteed pada Pod. Hasil juga mengesahkan bahwa Pod Container memiliki memory request yang cocok dengan memory limitnya, dan CPU request yang cocok dengan CPU limitnya. The output shows that Kubernetes gave the Pod a QoS class of Guaranteed. The output also verifies that the Pod Container has a memory request that matches its memory limit, and it has a CPU request that matches its CPU limit. ```yaml spec: containers: ... resources: limits: cpu: 700m memory: 200Mi requests: cpu: 700m memory: 200Mi ... status: qosClass: Guaranteed ``` {{< note >}} Jika sebuah Container menentukan sendiri memory limitnya, namun tidak menentukan memory request, Kubernetes secara otomatis akan menetapkan memory request yang cocok dengan memory limitnya. Sama halnya jika sebuah Container menentukan sendiri CPU limitnya, namun tidak menetapkan CPU request, Kubernetes secara otomatis akan menetapkan CPU request yang cocok dengan limitnya. If a Container specifies its own memory limit, but does not specify a memory request, Kubernetes automatically assigns a memory request that matches the limit. Similarly, if a Container specifies its own CPU limit, but does not specify a CPU request, Kubernetes automatically assigns a CPU request that matches the limit. {{< /note >}} Menghapus Pod anda: ```shell kubectl delete pod qos-demo --namespace=qos-example ``` ## Create a Pod that gets assigned a QoS class of Burstable Pod akan mendapatkan kelas QoS Burstable apabila: //A Pod is given a QoS class of Burstable if: * Pod tidak memenuhi kriteria untuk kelas QoS Guaranteed. * Minimal satu kontainer dalam Pod memiliki sebuah memory atau CPU request. //* The Pod does not meet the criteria for QoS class Guaranteed. //* At least one Container in the Pod has a memory or CPU request. Berikut adalah file konfigurasi untuk Pod yang memiliki satu Container. Container yang dimaksud memiliki memory limit sebesar 200MiB dan memory request sebesar 100MiB //Here is the configuration file for a Pod that has one Container. The Container has a memory limit of 200 MiB and a memory request of 100 MiB. {{< codenew file="pods/qos/qos-pod-2.yaml" >}} Membuat Pod: ```shell kubectl apply -f https://k8s.io/examples/pods/qos/qos-pod-2.yaml --namespace=qos-example ``` Melihat informasi detail mengenai Pod //View detailed information about the Pod: ```shell kubectl get pod qos-demo-2 --namespace=qos-example --output=yaml ``` Hasil menampilkan bahwa Kubernetes memberikan kelas QoS Burstable pada Pod. //The output shows that Kubernetes gave the Pod a QoS class of Burstable. ```yaml spec: containers: - image: nginx imagePullPolicy: Always name: qos-demo-2-ctr resources: limits: memory: 200Mi requests: memory: 100Mi ... status: qosClass: Burstable ``` Menghapus Pod anda: // Delete your Pod: ```shell kubectl delete pod qos-demo-2 --namespace=qos-example ``` ## Create a Pod that gets assigned a QoS class of BestEffort Agar Pod mendapatkan kelas QoS BestEffort, Container-Container dalam pod tidak boleh sama sekali memiliki memory atau CPU limit atau request. //For a Pod to be given a QoS class of BestEffort, the Containers in the Pod must not have any memory or CPU limits or requests. Berikut adalah file konfigurasi untuk Pod yang memiliki satu Container. Container yang dimaksud tidak memiliki memory atau CPU limit atau request. //Here is the configuration file for a Pod that has one Container. The Container has no memory or CPU limits or requests: {{< codenew file="pods/qos/qos-pod-3.yaml" >}} Membuat Pod: ```shell kubectl apply -f https://k8s.io/examples/pods/qos/qos-pod-3.yaml --namespace=qos-example ``` Melihat informasi detail mengenai Pod //View detailed information about the Pod: ```shell kubectl get pod qos-demo-3 --namespace=qos-example --output=yaml ``` Hasil menampilkan bahwa Kubernetes memberikan kelas QoS BestEffort pada Pod. //The output shows that Kubernetes gave the Pod a QoS class of BestEffort. ```yaml spec: containers: ... resources: {} ... status: qosClass: BestEffort ``` Menghapus Pod //Delete your Pod: ```shell kubectl delete pod qos-demo-3 --namespace=qos-example ``` ## Create a Pod that has two Containers Berikut adalah konfigurasi file untuk Pod yang memiliki dua Container. Satu Container menentukan memory request sebesar 200MiB. Container yang lain tidak menentukan request atau limit sama sekali //Here is the configuration file for a Pod that has two Containers. One container specifies a memory request of 200 MiB. The other Container does not specify any requests or limits. {{< codenew file="pods/qos/qos-pod-4.yaml" >}} Perhatikan bahwa Pod ini memenuhi kriteria untuk kelas QoS Burstable. Maksudnya, Container tersebut tidak memenuhi kriteria untuk kelas QoS Guaranteed, dan satu dari Container-Containernya memiliki memory request. //Notice that this Pod meets the criteria for QoS class Burstable. That is, it does not meet the criteria for QoS class Guaranteed, and one of its Containers has a memory request. Membuat Pod: ```shell kubectl apply -f https://k8s.io/examples/pods/qos/qos-pod-4.yaml --namespace=qos-example ``` Melihat informasi detail mengenai Pod //View detailed information about the Pod: ```shell kubectl get pod qos-demo-4 --namespace=qos-example --output=yaml ``` Hasil menampilkan bahwa Kubernetes memberikan kelas QoS Burstaable pada Pod. //The output shows that Kubernetes gave the Pod a QoS class of Burstable: ```yaml spec: containers: ... name: qos-demo-4-ctr-1 resources: requests: memory: 200Mi ... name: qos-demo-4-ctr-2 resources: {} ... status: qosClass: Burstable ``` Menghapus Pod anda: //Delete your Pod: ```shell kubectl delete pod qos-demo-4 --namespace=qos-example ``` ## Clean up Menghapus *namespace //Delete your namespace: ```shell kubectl delete namespace qos-example ``` ## {{% heading "whatsnext" %}} ### For app developers * [Assign Memory Resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-memory-resource/) * [Assign CPU Resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-cpu-resource/) ### For cluster administrators * [Configure Default Memory Requests and Limits for a Namespace](/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/) * [Configure Default CPU Requests and Limits for a Namespace](/docs/tasks/administer-cluster/manage-resources/cpu-default-namespace/) * [Configure Minimum and Maximum Memory Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/memory-constraint-namespace/) * [Configure Minimum and Maximum CPU Constraints for a Namespace](/docs/tasks/administer-cluster/manage-resources/cpu-constraint-namespace/) * [Configure Memory and CPU Quotas for a Namespace](/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/) * [Configure a Pod Quota for a Namespace](/docs/tasks/administer-cluster/manage-resources/quota-pod-namespace/) * [Configure Quotas for API Objects](/docs/tasks/administer-cluster/quota-api-object/) * [Control Topology Management policies on a node](/docs/tasks/administer-cluster/topology-manager/)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully