[Python] GCP Managed Instance Group Scale-in while keeping specific instances

Discussão em 'Python' iniciado por Stack, Junho 5, 2025.

  1. Stack

    Stack Membro Participativo

    I'm working on automating a product we’re developing using Python and Google Cloud's Managed Instance Groups (MIGs).

    I want to implement a scale-in operation on a MIG, but with a specific requirement: One particular instance with a known external IP address must not be deleted during the scale-in process.

    Is there a way to mark or configure the MIG so that a specific instances will be excluded from deletion during scale-in?

    I looked into targetPools and preserved states, but it's still unclear whether this can protect an instance from being removed when the group shrinks, and how to apply it on a specific instances.

    Any advice or workaround would be appreciated. Thanks!

    Continue reading...

Compartilhe esta Página