Políticas do Kubernetes Engine (OKE)

Mostra como permitir que o DR (Disaster Recovery) gerencie o Kubernetes Engine (OKE) que faz parte da pilha de aplicativos.

Políticas para configurar usando o controlador de recursos


Allow dynamic-group <Dynamic_group_Name> to manage compute-container-family in compartment <cluster_compartment>
Allow dynamic-group <Dynamic_group_Name> to manage object-family in compartment <compartment>
Allow dynamic-group <Dynamic_group_Name> to manage cluster-family in comparment <>
allow dynamic-group <Dynamic_group_Name> to manage cluster-virtualnode-pools in comparment <>

Virtual Node Pool

Allow any-user to manage objects in tenancy where all { request.principal.type = 'workload',
request.principal.namespace = 'brie', request.principal.service_account = 'brie-reader',
request.principal.cluster_id = '<Cluster_OCID>'}
Allow any-user to manage objects in tenancy where all { request.principal.type = 'workload',
request.principal.namespace = 'brie', request.principal.service_account = 'brie-creator',
request.principal.cluster_id = '<Cluster_OCID>'}

Políticas para configurar usando autenticação de usuário:

Política para acesso ao bucket de armazenamento de Objetos do OKE:

Esta política permite que o serviço Full Stack DR acesse o bucket de armazenamento de Objetos para fazer upload do backup de configuração. A política de acesso ao bucket de armazenamento de Objetos do cluster do OKE depende do tipo de cluster.

Pool de Nós Gerenciados:

Criar um grupo dinâmico <cluster1_dg> com

All {instance.compartment.id = '<compartment_ocid>'}

Criar uma política:

Allow dynamic-group cluster1_dg to manage object-family in compartment <compartment>
Allow dynamic-group cluster1_dg to manage cluster-family in compartment <compartment>

Pool de Nós Virtuais:

Crie as seguintes políticas:
Allow any-user to manage objects in tenancy where all { request.principal.type = 'workload',
request.principal.namespace = 'brie', request.principal.service_account = 'brie-reader',
request.principal.cluster_id = '<Cluster_OCID>'}
Allow any-user to manage objects in tenancy where all { request.principal.type = 'workload',
request.principal.namespace = 'brie', request.principal.service_account = 'brie-creator',
request.principal.cluster_id = '<Cluster_OCID>'}

Essas políticas fornecem pods em execução no namespace brie com brie-reader ou brie-creator da conta de serviço para ler e gravar no bucket de Armazenamento de objetos.

Política para instância de contêiner:

Esta política permite que as instâncias de contêiner de runtime criadas pelo serviço Full Stack DR acessem o cluster do OKE e o bucket de armazenamento de Objetos. Criar um grupo dinâmico <bastion1_dg> com

All {resource.type='computecontainerinstance'}

Criar uma política:
Allow dynamic-group bastion1_dg to manage object-family in compartment <compartment>
Allow dynamic-group bastion1_dg to manage cluster-family in compartment <compartment>

Política para jump host

Se você estiver usando o jump host, essa política permitirá que o Full Stack DR acesse o cluster do OKE e os buckets do Object Storage.

Se o jump host e o cluster estiverem no mesmo compartimento, você poderá evitar etapas para criar um novo grupo dinâmico e uma nova política para fornecer acesso ao bucket de armazenamento de Objetos.

Criar um grupo dinâmico <bastion1_dg> com

All {instance.compartment.id = '<compartment_ocid>'}

Criar uma política:

Allow dynamic-group bastion1_dg to manage cluster-family in compartment <compartment>Allow dynamic-group bastion1_dg to manage cluster in compartment
    <compartment>

Se você não tiver um jump host e precisar iniciar uma instância de contêiner, crie a seguinte política:

Allow group <> to manage compute-container-family in compartment <cluster_compartment>
Allow group <> to use virtual-network-family in compartment <cluster_network_compartment>
Allow group <> to read repos in tenancy