Configure deployment targets for a landscape
Create a deployment target to make a deployment class available in a landscape. A target names the class and carries a connection block that tells the class's deployer where to deploy. The deployer defines what the block contains and reports whether it accepts the target.
The deployer is installed centrally. This task configures a landscape to use one of its classes; repeat it for each class the landscape's applications need.
For the relationship between artifacts, deployment classes, deployers, targets, and landscapes, see the Deployment model.
Prerequisites
- A ready landscape.
- A deployer that provides the class you need. Check:
kubectl get deploymentclasseslists it. See Choose a deployer. - The connection block for that deployer, from its page. For the Kubernetes deployer, see Connection types.
kubectlaccess with permission to readDeploymentClassandLandscaperesources, and to create and readDeploymentTargetresources in the landscape namespace.
Set the names used below:
export PROJECT_NAMESPACE=kden-p-ecommerce-platform
export LANDSCAPE_NAMESPACE=$(kubectl get landscape dev \
--namespace="$PROJECT_NAMESPACE" \
--output=jsonpath='{.status.namespace}')Choose the deployment class
Each artifact names the deployment class it requires. A landscape needs one ready target for every class its stages deploy. List the classes installed deployers advertise:
kubectl get deploymentclassesUse the exact value from the NAME column as spec.deploymentClassName. A landscape can hold only one target per class. The class name is immutable after creation, because changing it would hand the target to another deployer.
Create the target
Save the following manifest as deployment-target.yaml. The connection block is the Kubernetes deployer's local connection, which deploys into the cluster the deployer runs in:
apiVersion: konfidence.cloud/v1alpha1
kind: DeploymentTarget
metadata:
name: helm-local
namespace: kden-l-dev
spec:
deploymentClassName: helm.konfidence.cloud
connection:
type: localReplace kden-l-dev with the value of LANDSCAPE_NAMESPACE, then apply the manifest:
kubectl apply -f deployment-target.yamlVerify the target
The deployer that owns the class validates the target and sets its Ready condition:
kubectl wait deploymenttarget/helm-local \
--namespace="$LANDSCAPE_NAMESPACE" \
--for=condition=Ready \
--timeout=60sThe command returns condition met. What Ready checks is up to the deployer. It can include configuration validation, credential checks, or a connectivity check. List all targets of the landscape:
kubectl get deploymenttargets --namespace="$LANDSCAPE_NAMESPACE"Troubleshooting
ReadystaysFalsewith reasonUnsupportedType: no deployer owns the class. Check the class name againstkubectl get deploymentclasses.ReadystaysFalsewith another reason: the connection block is wrong for the deployer. The reason and message come from the deployer. For the Kubernetes deployer, see Connection types.- The target never gets a condition: the deployer that owns the class is not running. See Install the Kubernetes deployer.
Next steps
- Connect artifact registries supplies credentials for private artifacts in this landscape.
- Choose landscape services identifies the runtime services your applications need.
- Create a stage selects a vector to deploy through the prepared landscape's targets.
- Types of artifacts explains how developers select a class for an artifact.
- DeploymentTarget CRD reference lists all fields.