Skip to content

ProjectVPC

Prerequisites

  • A Kubernetes cluster with the operator installed using helm, kubectl or kind (for local development).
  • A Kubernetes Secret with an Aiven authentication token.

Required permissions

To create and manage this resource, you must have the appropriate roles or permissions. See the Aiven documentation for details on managing permissions.

This resource uses the following API operations, and for each operation, any of the listed permissions is sufficient:

Operation Permissions
ServiceList project:services:read
VpcCreate project:networking:write
VpcDelete project:networking:write
VpcGet project:networking:read

Usage example

apiVersion: aiven.io/v1alpha1
kind: ProjectVPC
metadata:
  name: my-project-vpc
spec:
  authSecretRef:
    name: aiven-token
    key: token

  project: aiven-project-name
  cloudName: google-europe-west1
  networkCidr: 10.0.0.0/24

Apply the resource with:

kubectl apply -f example.yaml

Verify the newly created ProjectVPC:

kubectl get projectvpcs my-project-vpc

The output is similar to the following:

Name              Project               Cloud                  Network CIDR    State      
my-project-vpc    aiven-project-name    google-europe-west1    10.0.0.0/24     RUNNING    


ProjectVPC

ProjectVPC is the Schema for the projectvpcs API.

Required

  • apiVersion (string). Value aiven.io/v1alpha1.
  • kind (string). Value ProjectVPC.
  • metadata (object). Data that identifies the object, including a name string and optional namespace.
  • spec (object). ProjectVPCSpec defines the desired state of ProjectVPC. See below for nested schema.

spec

Appears on ProjectVPC.

ProjectVPCSpec defines the desired state of ProjectVPC.

Required

  • cloudName (string, Immutable, MaxLength: 256). Cloud the VPC is in.
  • networkCidr (string, Immutable, MaxLength: 36). Network address range used by the VPC like 192.168.0.0/24.
  • project (string, Immutable, Pattern: ^[a-zA-Z0-9_-]+$, MaxLength: 63). Identifies the project this resource belongs to.

Optional

authSecretRef

Appears on spec.

Authentication reference to Aiven token in a secret.

Required

  • key (string, MinLength: 1).
  • name (string, MinLength: 1).