gcore 0.22.0 published on Wednesday, Apr 30, 2025 by g-core
gcore.getK8sv2
Explore with Pulumi AI
Represent k8s cluster with one default pool.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcore from "@pulumi/gcore";
const pr = gcore.getProject({
name: "test",
});
const rg = gcore.getRegion({
name: "ED-10 Preprod",
});
const k8sv2 = Promise.all([rg, pr]).then(([rg, pr]) => gcore.getK8sv2({
name: "cluster1",
regionId: rg.id,
projectId: pr.id,
}));
export const view = k8sv2;
import pulumi
import pulumi_gcore as gcore
pr = gcore.get_project(name="test")
rg = gcore.get_region(name="ED-10 Preprod")
k8sv2 = gcore.get_k8sv2(name="cluster1",
region_id=rg.id,
project_id=pr.id)
pulumi.export("view", k8sv2)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/gcore"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
pr, err := gcore.GetProject(ctx, &gcore.GetProjectArgs{
Name: "test",
}, nil)
if err != nil {
return err
}
rg, err := gcore.GetRegion(ctx, &gcore.GetRegionArgs{
Name: "ED-10 Preprod",
}, nil)
if err != nil {
return err
}
k8sv2, err := gcore.LookupK8sv2(ctx, &gcore.LookupK8sv2Args{
Name: "cluster1",
RegionId: pulumi.Float64Ref(rg.Id),
ProjectId: pulumi.Float64Ref(pr.Id),
}, nil)
if err != nil {
return err
}
ctx.Export("view", k8sv2)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcore = Pulumi.Gcore;
return await Deployment.RunAsync(() =>
{
var pr = Gcore.GetProject.Invoke(new()
{
Name = "test",
});
var rg = Gcore.GetRegion.Invoke(new()
{
Name = "ED-10 Preprod",
});
var k8sv2 = Gcore.GetK8sv2.Invoke(new()
{
Name = "cluster1",
RegionId = rg.Apply(getRegionResult => getRegionResult.Id),
ProjectId = pr.Apply(getProjectResult => getProjectResult.Id),
});
return new Dictionary<string, object?>
{
["view"] = k8sv2,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcore.GcoreFunctions;
import com.pulumi.gcore.inputs.GetProjectArgs;
import com.pulumi.gcore.inputs.GetRegionArgs;
import com.pulumi.gcore.inputs.GetK8sv2Args;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var pr = GcoreFunctions.getProject(GetProjectArgs.builder()
.name("test")
.build());
final var rg = GcoreFunctions.getRegion(GetRegionArgs.builder()
.name("ED-10 Preprod")
.build());
final var k8sv2 = GcoreFunctions.getK8sv2(GetK8sv2Args.builder()
.name("cluster1")
.regionId(rg.applyValue(getRegionResult -> getRegionResult.id()))
.projectId(pr.applyValue(getProjectResult -> getProjectResult.id()))
.build());
ctx.export("view", k8sv2.applyValue(getK8sv2Result -> getK8sv2Result));
}
}
variables:
pr:
fn::invoke:
function: gcore:getProject
arguments:
name: test
rg:
fn::invoke:
function: gcore:getRegion
arguments:
name: ED-10 Preprod
k8sv2:
fn::invoke:
function: gcore:getK8sv2
arguments:
name: cluster1
regionId: ${rg.id}
projectId: ${pr.id}
outputs:
view: ${k8sv2}
Using getK8sv2
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getK8sv2(args: GetK8sv2Args, opts?: InvokeOptions): Promise<GetK8sv2Result>
function getK8sv2Output(args: GetK8sv2OutputArgs, opts?: InvokeOptions): Output<GetK8sv2Result>
def get_k8sv2(id: Optional[str] = None,
name: Optional[str] = None,
project_id: Optional[float] = None,
project_name: Optional[str] = None,
region_id: Optional[float] = None,
region_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetK8sv2Result
def get_k8sv2_output(id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[float]] = None,
project_name: Optional[pulumi.Input[str]] = None,
region_id: Optional[pulumi.Input[float]] = None,
region_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetK8sv2Result]
func LookupK8sv2(ctx *Context, args *LookupK8sv2Args, opts ...InvokeOption) (*LookupK8sv2Result, error)
func LookupK8sv2Output(ctx *Context, args *LookupK8sv2OutputArgs, opts ...InvokeOption) LookupK8sv2ResultOutput
> Note: This function is named LookupK8sv2
in the Go SDK.
public static class GetK8sv2
{
public static Task<GetK8sv2Result> InvokeAsync(GetK8sv2Args args, InvokeOptions? opts = null)
public static Output<GetK8sv2Result> Invoke(GetK8sv2InvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetK8sv2Result> getK8sv2(GetK8sv2Args args, InvokeOptions options)
public static Output<GetK8sv2Result> getK8sv2(GetK8sv2Args args, InvokeOptions options)
fn::invoke:
function: gcore:index/getK8sv2:getK8sv2
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- Id string
- The ID of this resource.
- Project
Id double - Project
Name string - Region
Id double - Region
Name string
- Name string
- Id string
- The ID of this resource.
- Project
Id float64 - Project
Name string - Region
Id float64 - Region
Name string
- name String
- id String
- The ID of this resource.
- project
Id Double - project
Name String - region
Id Double - region
Name String
- name string
- id string
- The ID of this resource.
- project
Id number - project
Name string - region
Id number - region
Name string
- name str
- id str
- The ID of this resource.
- project_
id float - project_
name str - region_
id float - region_
name str
- name String
- id String
- The ID of this resource.
- project
Id Number - project
Name String - region
Id Number - region
Name String
getK8sv2 Result
The following output properties are available:
- Authentications
List<Get
K8sv2Authentication> - Cluster authentication configuration.
- Autoscaler
Config Dictionary<string, string> - Cluster autoscaler configuration params. Keys and values are expected to follow the cluster-autoscaler option format.
- Cnis
List<Get
K8sv2Cni> - Cluster CNI configuration.
- Created
At string - Creator
Task stringId - Fixed
Network string - Fixed
Subnet string - Flavor
Id string - Id string
- The ID of this resource.
- Is
Ipv6 bool - Enable public IPv6 address.
- Is
Public bool - Keypair string
- Name string
- Node
Count double - Pods
Ip stringPool - Pods IPv4 IP pool in CIDR notation.
- Pods
Ipv6Pool string - Pods IPv6 IP pool in CIDR notation.
- Pools
List<Get
K8sv2Pool> - Services
Ip stringPool - Services IPv4 IP pool in CIDR notation.
- Services
Ipv6Pool string - Services IPv6 IP pool in CIDR notation.
- Status string
- Task
Id string - Version string
- Project
Id double - Project
Name string - Region
Id double - Region
Name string
- Authentications
[]Get
K8sv2Authentication - Cluster authentication configuration.
- Autoscaler
Config map[string]string - Cluster autoscaler configuration params. Keys and values are expected to follow the cluster-autoscaler option format.
- Cnis
[]Get
K8sv2Cni - Cluster CNI configuration.
- Created
At string - Creator
Task stringId - Fixed
Network string - Fixed
Subnet string - Flavor
Id string - Id string
- The ID of this resource.
- Is
Ipv6 bool - Enable public IPv6 address.
- Is
Public bool - Keypair string
- Name string
- Node
Count float64 - Pods
Ip stringPool - Pods IPv4 IP pool in CIDR notation.
- Pods
Ipv6Pool string - Pods IPv6 IP pool in CIDR notation.
- Pools
[]Get
K8sv2Pool - Services
Ip stringPool - Services IPv4 IP pool in CIDR notation.
- Services
Ipv6Pool string - Services IPv6 IP pool in CIDR notation.
- Status string
- Task
Id string - Version string
- Project
Id float64 - Project
Name string - Region
Id float64 - Region
Name string
- authentications
List<Get
K8sv2Authentication> - Cluster authentication configuration.
- autoscaler
Config Map<String,String> - Cluster autoscaler configuration params. Keys and values are expected to follow the cluster-autoscaler option format.
- cnis
List<Get
K8sv2Cni> - Cluster CNI configuration.
- created
At String - creator
Task StringId - fixed
Network String - fixed
Subnet String - flavor
Id String - id String
- The ID of this resource.
- is
Ipv6 Boolean - Enable public IPv6 address.
- is
Public Boolean - keypair String
- name String
- node
Count Double - pods
Ip StringPool - Pods IPv4 IP pool in CIDR notation.
- pods
Ipv6Pool String - Pods IPv6 IP pool in CIDR notation.
- pools
List<Get
K8sv2Pool> - services
Ip StringPool - Services IPv4 IP pool in CIDR notation.
- services
Ipv6Pool String - Services IPv6 IP pool in CIDR notation.
- status String
- task
Id String - version String
- project
Id Double - project
Name String - region
Id Double - region
Name String
- authentications
Get
K8sv2Authentication[] - Cluster authentication configuration.
- autoscaler
Config {[key: string]: string} - Cluster autoscaler configuration params. Keys and values are expected to follow the cluster-autoscaler option format.
- cnis
Get
K8sv2Cni[] - Cluster CNI configuration.
- created
At string - creator
Task stringId - fixed
Network string - fixed
Subnet string - flavor
Id string - id string
- The ID of this resource.
- is
Ipv6 boolean - Enable public IPv6 address.
- is
Public boolean - keypair string
- name string
- node
Count number - pods
Ip stringPool - Pods IPv4 IP pool in CIDR notation.
- pods
Ipv6Pool string - Pods IPv6 IP pool in CIDR notation.
- pools
Get
K8sv2Pool[] - services
Ip stringPool - Services IPv4 IP pool in CIDR notation.
- services
Ipv6Pool string - Services IPv6 IP pool in CIDR notation.
- status string
- task
Id string - version string
- project
Id number - project
Name string - region
Id number - region
Name string
- authentications
Sequence[Get
K8sv2Authentication] - Cluster authentication configuration.
- autoscaler_
config Mapping[str, str] - Cluster autoscaler configuration params. Keys and values are expected to follow the cluster-autoscaler option format.
- cnis
Sequence[Get
K8sv2Cni] - Cluster CNI configuration.
- created_
at str - creator_
task_ strid - fixed_
network str - fixed_
subnet str - flavor_
id str - id str
- The ID of this resource.
- is_
ipv6 bool - Enable public IPv6 address.
- is_
public bool - keypair str
- name str
- node_
count float - pods_
ip_ strpool - Pods IPv4 IP pool in CIDR notation.
- pods_
ipv6_ strpool - Pods IPv6 IP pool in CIDR notation.
- pools
Sequence[Get
K8sv2Pool] - services_
ip_ strpool - Services IPv4 IP pool in CIDR notation.
- services_
ipv6_ strpool - Services IPv6 IP pool in CIDR notation.
- status str
- task_
id str - version str
- project_
id float - project_
name str - region_
id float - region_
name str
- authentications List<Property Map>
- Cluster authentication configuration.
- autoscaler
Config Map<String> - Cluster autoscaler configuration params. Keys and values are expected to follow the cluster-autoscaler option format.
- cnis List<Property Map>
- Cluster CNI configuration.
- created
At String - creator
Task StringId - fixed
Network String - fixed
Subnet String - flavor
Id String - id String
- The ID of this resource.
- is
Ipv6 Boolean - Enable public IPv6 address.
- is
Public Boolean - keypair String
- name String
- node
Count Number - pods
Ip StringPool - Pods IPv4 IP pool in CIDR notation.
- pods
Ipv6Pool String - Pods IPv6 IP pool in CIDR notation.
- pools List<Property Map>
- services
Ip StringPool - Services IPv4 IP pool in CIDR notation.
- services
Ipv6Pool String - Services IPv6 IP pool in CIDR notation.
- status String
- task
Id String - version String
- project
Id Number - project
Name String - region
Id Number - region
Name String
Supporting Types
GetK8sv2Authentication
GetK8sv2AuthenticationOidc
- Client
Id string - Groups
Claim string - Groups
Prefix string - Issuer
Url string - Required
Claims Dictionary<string, string> - Signing
Algs List<string> - Username
Claim string - Username
Prefix string
- Client
Id string - Groups
Claim string - Groups
Prefix string - Issuer
Url string - Required
Claims map[string]string - Signing
Algs []string - Username
Claim string - Username
Prefix string
- client
Id String - groups
Claim String - groups
Prefix String - issuer
Url String - required
Claims Map<String,String> - signing
Algs List<String> - username
Claim String - username
Prefix String
- client
Id string - groups
Claim string - groups
Prefix string - issuer
Url string - required
Claims {[key: string]: string} - signing
Algs string[] - username
Claim string - username
Prefix string
- client_
id str - groups_
claim str - groups_
prefix str - issuer_
url str - required_
claims Mapping[str, str] - signing_
algs Sequence[str] - username_
claim str - username_
prefix str
- client
Id String - groups
Claim String - groups
Prefix String - issuer
Url String - required
Claims Map<String> - signing
Algs List<String> - username
Claim String - username
Prefix String
GetK8sv2Cni
- Cilia
[]Get
K8sv2Cni Cilium - Provider string
- cilia
Get
K8sv2Cni Cilium[] - provider string
- cilia List<Property Map>
- provider String
GetK8sv2CniCilium
- Encryption bool
- Hubble
Relay bool - Hubble
Ui bool - Lb
Acceleration bool - Lb
Mode string - Mask
Size double - Mask
Size doubleV6 - Routing
Mode string - Tunnel string
- Encryption bool
- Hubble
Relay bool - Hubble
Ui bool - Lb
Acceleration bool - Lb
Mode string - Mask
Size float64 - Mask
Size float64V6 - Routing
Mode string - Tunnel string
- encryption Boolean
- hubble
Relay Boolean - hubble
Ui Boolean - lb
Acceleration Boolean - lb
Mode String - mask
Size Double - mask
Size DoubleV6 - routing
Mode String - tunnel String
- encryption boolean
- hubble
Relay boolean - hubble
Ui boolean - lb
Acceleration boolean - lb
Mode string - mask
Size number - mask
Size numberV6 - routing
Mode string - tunnel string
- encryption bool
- hubble_
relay bool - hubble_
ui bool - lb_
acceleration bool - lb_
mode str - mask_
size float - mask_
size_ floatv6 - routing_
mode str - tunnel str
- encryption Boolean
- hubble
Relay Boolean - hubble
Ui Boolean - lb
Acceleration Boolean - lb
Mode String - mask
Size Number - mask
Size NumberV6 - routing
Mode String - tunnel String
GetK8sv2Pool
- Auto
Healing boolEnabled - Boot
Volume doubleSize - Boot
Volume stringType - Created
At string - Crio
Config Dictionary<string, string> - Flavor
Id string - Is
Public boolIpv4 - Kubelet
Config Dictionary<string, string> - Labels Dictionary<string, string>
- Max
Node doubleCount - Min
Node doubleCount - Name string
- Node
Count double - Servergroup
Id string - Servergroup
Name string - Servergroup
Policy string - Status string
- Taints Dictionary<string, string>
- Auto
Healing boolEnabled - Boot
Volume float64Size - Boot
Volume stringType - Created
At string - Crio
Config map[string]string - Flavor
Id string - Is
Public boolIpv4 - Kubelet
Config map[string]string - Labels map[string]string
- Max
Node float64Count - Min
Node float64Count - Name string
- Node
Count float64 - Servergroup
Id string - Servergroup
Name string - Servergroup
Policy string - Status string
- Taints map[string]string
- auto
Healing BooleanEnabled - boot
Volume DoubleSize - boot
Volume StringType - created
At String - crio
Config Map<String,String> - flavor
Id String - is
Public BooleanIpv4 - kubelet
Config Map<String,String> - labels Map<String,String>
- max
Node DoubleCount - min
Node DoubleCount - name String
- node
Count Double - servergroup
Id String - servergroup
Name String - servergroup
Policy String - status String
- taints Map<String,String>
- auto
Healing booleanEnabled - boot
Volume numberSize - boot
Volume stringType - created
At string - crio
Config {[key: string]: string} - flavor
Id string - is
Public booleanIpv4 - kubelet
Config {[key: string]: string} - labels {[key: string]: string}
- max
Node numberCount - min
Node numberCount - name string
- node
Count number - servergroup
Id string - servergroup
Name string - servergroup
Policy string - status string
- taints {[key: string]: string}
- auto_
healing_ boolenabled - boot_
volume_ floatsize - boot_
volume_ strtype - created_
at str - crio_
config Mapping[str, str] - flavor_
id str - is_
public_ boolipv4 - kubelet_
config Mapping[str, str] - labels Mapping[str, str]
- max_
node_ floatcount - min_
node_ floatcount - name str
- node_
count float - servergroup_
id str - servergroup_
name str - servergroup_
policy str - status str
- taints Mapping[str, str]
- auto
Healing BooleanEnabled - boot
Volume NumberSize - boot
Volume StringType - created
At String - crio
Config Map<String> - flavor
Id String - is
Public BooleanIpv4 - kubelet
Config Map<String> - labels Map<String>
- max
Node NumberCount - min
Node NumberCount - name String
- node
Count Number - servergroup
Id String - servergroup
Name String - servergroup
Policy String - status String
- taints Map<String>
Package Details
- Repository
- gcore g-core/terraform-provider-gcore
- License
- Notes
- This Pulumi package is based on the
gcore
Terraform Provider.