published on Monday, Apr 27, 2026 by akeyless-community
published on Monday, Apr 27, 2026 by akeyless-community
K8S Target resource
Create TargetK8s Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TargetK8s(name: string, args: TargetK8sArgs, opts?: CustomResourceOptions);@overload
def TargetK8s(resource_name: str,
args: TargetK8sArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TargetK8s(resource_name: str,
opts: Optional[ResourceOptions] = None,
k8s_cluster_ca_cert: Optional[str] = None,
k8s_cluster_token: Optional[str] = None,
k8s_cluster_endpoint: Optional[str] = None,
k8s_cluster_name: Optional[str] = None,
k8s_client_key: Optional[str] = None,
k8s_client_certificate: Optional[str] = None,
description: Optional[str] = None,
k8s_auth_type: Optional[str] = None,
keep_prev_version: Optional[str] = None,
key: Optional[str] = None,
max_versions: Optional[str] = None,
name: Optional[str] = None,
target_k8s_id: Optional[str] = None,
use_gw_service_account: Optional[bool] = None)func NewTargetK8s(ctx *Context, name string, args TargetK8sArgs, opts ...ResourceOption) (*TargetK8s, error)public TargetK8s(string name, TargetK8sArgs args, CustomResourceOptions? opts = null)
public TargetK8s(String name, TargetK8sArgs args)
public TargetK8s(String name, TargetK8sArgs args, CustomResourceOptions options)
type: akeyless:TargetK8s
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args TargetK8sArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args TargetK8sArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args TargetK8sArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TargetK8sArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TargetK8sArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var targetK8sResource = new Akeyless.TargetK8s("targetK8sResource", new()
{
K8sClusterCaCert = "string",
K8sClusterToken = "string",
K8sClusterEndpoint = "string",
K8sClusterName = "string",
K8sClientKey = "string",
K8sClientCertificate = "string",
Description = "string",
K8sAuthType = "string",
KeepPrevVersion = "string",
Key = "string",
MaxVersions = "string",
Name = "string",
TargetK8sId = "string",
UseGwServiceAccount = false,
});
example, err := akeyless.NewTargetK8s(ctx, "targetK8sResource", &akeyless.TargetK8sArgs{
K8sClusterCaCert: pulumi.String("string"),
K8sClusterToken: pulumi.String("string"),
K8sClusterEndpoint: pulumi.String("string"),
K8sClusterName: pulumi.String("string"),
K8sClientKey: pulumi.String("string"),
K8sClientCertificate: pulumi.String("string"),
Description: pulumi.String("string"),
K8sAuthType: pulumi.String("string"),
KeepPrevVersion: pulumi.String("string"),
Key: pulumi.String("string"),
MaxVersions: pulumi.String("string"),
Name: pulumi.String("string"),
TargetK8sId: pulumi.String("string"),
UseGwServiceAccount: pulumi.Bool(false),
})
var targetK8sResource = new TargetK8s("targetK8sResource", TargetK8sArgs.builder()
.k8sClusterCaCert("string")
.k8sClusterToken("string")
.k8sClusterEndpoint("string")
.k8sClusterName("string")
.k8sClientKey("string")
.k8sClientCertificate("string")
.description("string")
.k8sAuthType("string")
.keepPrevVersion("string")
.key("string")
.maxVersions("string")
.name("string")
.targetK8sId("string")
.useGwServiceAccount(false)
.build());
target_k8s_resource = akeyless.TargetK8s("targetK8sResource",
k8s_cluster_ca_cert="string",
k8s_cluster_token="string",
k8s_cluster_endpoint="string",
k8s_cluster_name="string",
k8s_client_key="string",
k8s_client_certificate="string",
description="string",
k8s_auth_type="string",
keep_prev_version="string",
key="string",
max_versions="string",
name="string",
target_k8s_id="string",
use_gw_service_account=False)
const targetK8sResource = new akeyless.TargetK8s("targetK8sResource", {
k8sClusterCaCert: "string",
k8sClusterToken: "string",
k8sClusterEndpoint: "string",
k8sClusterName: "string",
k8sClientKey: "string",
k8sClientCertificate: "string",
description: "string",
k8sAuthType: "string",
keepPrevVersion: "string",
key: "string",
maxVersions: "string",
name: "string",
targetK8sId: "string",
useGwServiceAccount: false,
});
type: akeyless:TargetK8s
properties:
description: string
k8sAuthType: string
k8sClientCertificate: string
k8sClientKey: string
k8sClusterCaCert: string
k8sClusterEndpoint: string
k8sClusterName: string
k8sClusterToken: string
keepPrevVersion: string
key: string
maxVersions: string
name: string
targetK8sId: string
useGwServiceAccount: false
TargetK8s Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The TargetK8s resource accepts the following input properties:
- K8s
Cluster stringCa Cert - K8S cluster CA certificate
- K8s
Cluster stringEndpoint - K8S cluster URL endpoint
- K8s
Cluster stringToken - K8S cluster Bearer token
- Description string
- Description of the object
- K8s
Auth stringType - K8S auth type [token/certificate]
- K8s
Client stringCertificate - Content of the k8 client certificate (PEM format) in a Base64 format
- K8s
Client stringKey - Content of the k8 client private key (PEM format) in a Base64 format
- K8s
Cluster stringName - K8S cluster name
- Keep
Prev stringVersion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- Key string
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- Max
Versions string - Set the maximum number of versions, limited by the account settings defaults.
- Name string
- Target name
- Target
K8s stringId - The ID of this resource.
- Use
Gw boolService Account - Use the GW's service account
- K8s
Cluster stringCa Cert - K8S cluster CA certificate
- K8s
Cluster stringEndpoint - K8S cluster URL endpoint
- K8s
Cluster stringToken - K8S cluster Bearer token
- Description string
- Description of the object
- K8s
Auth stringType - K8S auth type [token/certificate]
- K8s
Client stringCertificate - Content of the k8 client certificate (PEM format) in a Base64 format
- K8s
Client stringKey - Content of the k8 client private key (PEM format) in a Base64 format
- K8s
Cluster stringName - K8S cluster name
- Keep
Prev stringVersion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- Key string
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- Max
Versions string - Set the maximum number of versions, limited by the account settings defaults.
- Name string
- Target name
- Target
K8s stringId - The ID of this resource.
- Use
Gw boolService Account - Use the GW's service account
- k8s
Cluster StringCa Cert - K8S cluster CA certificate
- k8s
Cluster StringEndpoint - K8S cluster URL endpoint
- k8s
Cluster StringToken - K8S cluster Bearer token
- description String
- Description of the object
- k8s
Auth StringType - K8S auth type [token/certificate]
- k8s
Client StringCertificate - Content of the k8 client certificate (PEM format) in a Base64 format
- k8s
Client StringKey - Content of the k8 client private key (PEM format) in a Base64 format
- k8s
Cluster StringName - K8S cluster name
- keep
Prev StringVersion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- key String
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- max
Versions String - Set the maximum number of versions, limited by the account settings defaults.
- name String
- Target name
- target
K8s StringId - The ID of this resource.
- use
Gw BooleanService Account - Use the GW's service account
- k8s
Cluster stringCa Cert - K8S cluster CA certificate
- k8s
Cluster stringEndpoint - K8S cluster URL endpoint
- k8s
Cluster stringToken - K8S cluster Bearer token
- description string
- Description of the object
- k8s
Auth stringType - K8S auth type [token/certificate]
- k8s
Client stringCertificate - Content of the k8 client certificate (PEM format) in a Base64 format
- k8s
Client stringKey - Content of the k8 client private key (PEM format) in a Base64 format
- k8s
Cluster stringName - K8S cluster name
- keep
Prev stringVersion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- key string
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- max
Versions string - Set the maximum number of versions, limited by the account settings defaults.
- name string
- Target name
- target
K8s stringId - The ID of this resource.
- use
Gw booleanService Account - Use the GW's service account
- k8s_
cluster_ strca_ cert - K8S cluster CA certificate
- k8s_
cluster_ strendpoint - K8S cluster URL endpoint
- k8s_
cluster_ strtoken - K8S cluster Bearer token
- description str
- Description of the object
- k8s_
auth_ strtype - K8S auth type [token/certificate]
- k8s_
client_ strcertificate - Content of the k8 client certificate (PEM format) in a Base64 format
- k8s_
client_ strkey - Content of the k8 client private key (PEM format) in a Base64 format
- k8s_
cluster_ strname - K8S cluster name
- keep_
prev_ strversion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- key str
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- max_
versions str - Set the maximum number of versions, limited by the account settings defaults.
- name str
- Target name
- target_
k8s_ strid - The ID of this resource.
- use_
gw_ boolservice_ account - Use the GW's service account
- k8s
Cluster StringCa Cert - K8S cluster CA certificate
- k8s
Cluster StringEndpoint - K8S cluster URL endpoint
- k8s
Cluster StringToken - K8S cluster Bearer token
- description String
- Description of the object
- k8s
Auth StringType - K8S auth type [token/certificate]
- k8s
Client StringCertificate - Content of the k8 client certificate (PEM format) in a Base64 format
- k8s
Client StringKey - Content of the k8 client private key (PEM format) in a Base64 format
- k8s
Cluster StringName - K8S cluster name
- keep
Prev StringVersion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- key String
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- max
Versions String - Set the maximum number of versions, limited by the account settings defaults.
- name String
- Target name
- target
K8s StringId - The ID of this resource.
- use
Gw BooleanService Account - Use the GW's service account
Outputs
All input properties are implicitly available as output properties. Additionally, the TargetK8s resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing TargetK8s Resource
Get an existing TargetK8s resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: TargetK8sState, opts?: CustomResourceOptions): TargetK8s@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
k8s_auth_type: Optional[str] = None,
k8s_client_certificate: Optional[str] = None,
k8s_client_key: Optional[str] = None,
k8s_cluster_ca_cert: Optional[str] = None,
k8s_cluster_endpoint: Optional[str] = None,
k8s_cluster_name: Optional[str] = None,
k8s_cluster_token: Optional[str] = None,
keep_prev_version: Optional[str] = None,
key: Optional[str] = None,
max_versions: Optional[str] = None,
name: Optional[str] = None,
target_k8s_id: Optional[str] = None,
use_gw_service_account: Optional[bool] = None) -> TargetK8sfunc GetTargetK8s(ctx *Context, name string, id IDInput, state *TargetK8sState, opts ...ResourceOption) (*TargetK8s, error)public static TargetK8s Get(string name, Input<string> id, TargetK8sState? state, CustomResourceOptions? opts = null)public static TargetK8s get(String name, Output<String> id, TargetK8sState state, CustomResourceOptions options)resources: _: type: akeyless:TargetK8s get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Description string
- Description of the object
- K8s
Auth stringType - K8S auth type [token/certificate]
- K8s
Client stringCertificate - Content of the k8 client certificate (PEM format) in a Base64 format
- K8s
Client stringKey - Content of the k8 client private key (PEM format) in a Base64 format
- K8s
Cluster stringCa Cert - K8S cluster CA certificate
- K8s
Cluster stringEndpoint - K8S cluster URL endpoint
- K8s
Cluster stringName - K8S cluster name
- K8s
Cluster stringToken - K8S cluster Bearer token
- Keep
Prev stringVersion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- Key string
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- Max
Versions string - Set the maximum number of versions, limited by the account settings defaults.
- Name string
- Target name
- Target
K8s stringId - The ID of this resource.
- Use
Gw boolService Account - Use the GW's service account
- Description string
- Description of the object
- K8s
Auth stringType - K8S auth type [token/certificate]
- K8s
Client stringCertificate - Content of the k8 client certificate (PEM format) in a Base64 format
- K8s
Client stringKey - Content of the k8 client private key (PEM format) in a Base64 format
- K8s
Cluster stringCa Cert - K8S cluster CA certificate
- K8s
Cluster stringEndpoint - K8S cluster URL endpoint
- K8s
Cluster stringName - K8S cluster name
- K8s
Cluster stringToken - K8S cluster Bearer token
- Keep
Prev stringVersion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- Key string
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- Max
Versions string - Set the maximum number of versions, limited by the account settings defaults.
- Name string
- Target name
- Target
K8s stringId - The ID of this resource.
- Use
Gw boolService Account - Use the GW's service account
- description String
- Description of the object
- k8s
Auth StringType - K8S auth type [token/certificate]
- k8s
Client StringCertificate - Content of the k8 client certificate (PEM format) in a Base64 format
- k8s
Client StringKey - Content of the k8 client private key (PEM format) in a Base64 format
- k8s
Cluster StringCa Cert - K8S cluster CA certificate
- k8s
Cluster StringEndpoint - K8S cluster URL endpoint
- k8s
Cluster StringName - K8S cluster name
- k8s
Cluster StringToken - K8S cluster Bearer token
- keep
Prev StringVersion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- key String
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- max
Versions String - Set the maximum number of versions, limited by the account settings defaults.
- name String
- Target name
- target
K8s StringId - The ID of this resource.
- use
Gw BooleanService Account - Use the GW's service account
- description string
- Description of the object
- k8s
Auth stringType - K8S auth type [token/certificate]
- k8s
Client stringCertificate - Content of the k8 client certificate (PEM format) in a Base64 format
- k8s
Client stringKey - Content of the k8 client private key (PEM format) in a Base64 format
- k8s
Cluster stringCa Cert - K8S cluster CA certificate
- k8s
Cluster stringEndpoint - K8S cluster URL endpoint
- k8s
Cluster stringName - K8S cluster name
- k8s
Cluster stringToken - K8S cluster Bearer token
- keep
Prev stringVersion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- key string
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- max
Versions string - Set the maximum number of versions, limited by the account settings defaults.
- name string
- Target name
- target
K8s stringId - The ID of this resource.
- use
Gw booleanService Account - Use the GW's service account
- description str
- Description of the object
- k8s_
auth_ strtype - K8S auth type [token/certificate]
- k8s_
client_ strcertificate - Content of the k8 client certificate (PEM format) in a Base64 format
- k8s_
client_ strkey - Content of the k8 client private key (PEM format) in a Base64 format
- k8s_
cluster_ strca_ cert - K8S cluster CA certificate
- k8s_
cluster_ strendpoint - K8S cluster URL endpoint
- k8s_
cluster_ strname - K8S cluster name
- k8s_
cluster_ strtoken - K8S cluster Bearer token
- keep_
prev_ strversion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- key str
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- max_
versions str - Set the maximum number of versions, limited by the account settings defaults.
- name str
- Target name
- target_
k8s_ strid - The ID of this resource.
- use_
gw_ boolservice_ account - Use the GW's service account
- description String
- Description of the object
- k8s
Auth StringType - K8S auth type [token/certificate]
- k8s
Client StringCertificate - Content of the k8 client certificate (PEM format) in a Base64 format
- k8s
Client StringKey - Content of the k8 client private key (PEM format) in a Base64 format
- k8s
Cluster StringCa Cert - K8S cluster CA certificate
- k8s
Cluster StringEndpoint - K8S cluster URL endpoint
- k8s
Cluster StringName - K8S cluster name
- k8s
Cluster StringToken - K8S cluster Bearer token
- keep
Prev StringVersion - Whether to keep previous version [true/false]. If not set, use default according to account settings
- key String
- The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
- max
Versions String - Set the maximum number of versions, limited by the account settings defaults.
- name String
- Target name
- target
K8s StringId - The ID of this resource.
- use
Gw BooleanService Account - Use the GW's service account
Package Details
- Repository
- akeyless akeyless-community/terraform-provider-akeyless
- License
- Notes
- This Pulumi package is based on the
akeylessTerraform Provider.
published on Monday, Apr 27, 2026 by akeyless-community
