Crossplane
Palette supports the open source Cloud Native Computing Foundation (CNCF) project Crossplane. Crossplane transforms Kubernetes clusters into universal control planes, extending the Kubernetes API and enabling infrastructure resource provisioning and management across major infrastructure providers.
These resources, called
Managed Resources (MR)
within the Crossplane environment, are essentially Kubernetes Custom Resource Definitions (CRDs) that represent
infrastructure resources as native Kubernetes objects. Because they are Kubernetes objects, you can interact with them
using standard commands like kubectl describe. When users create a managed resource, Crossplane interacts with the
infrastructure provider API to request the creation of the resource within the provider's environment.
Palette Provider
You can use the Palette Crossplane provider to interact with the Palette API and create resources declaratively.
Refer to the Palette Provider page for a complete list of managed resources and examples.
Configure a Custom CA Certificate and Proxy
If your environment requires the Palette Crossplane provider to trust a custom certificate authority (CA) or route API
calls through a proxy, inject those settings through a DeploymentRuntimeConfig resource. The provider mounts the
certificate and picks up the proxy environment variables at startup, so you do not need to rebuild the provider image.
Set your kubeconfig before running the kubectl commands in this procedure.
export KUBECONFIG=<path-to-kubeconfig>
-
Store your CA certificate in a
ConfigMapin thecrossplane-systemnamespace, or in the namespace where the provider pod runs.apiVersion: v1
kind: ConfigMap
metadata:
name: cert-map
namespace: crossplane-system
data:
cert: |
-----BEGIN CERTIFICATE-----
<ca-certificate-body>
-----END CERTIFICATE-----Replace
<ca-certificate-body>with the contents of your CA certificate.If preferred, you can use a
Secretinstead of aConfigMap. -
Create a
DeploymentRuntimeConfigresource that defines the proxy environment variables and mounts the certificate into thepackage-runtimecontainer of the provider.apiVersion: pkg.crossplane.io/v1beta1
kind: DeploymentRuntimeConfig
metadata:
name: palette-provider-runtime
spec:
deploymentTemplate:
spec:
selector: {}
template:
spec:
containers:
- name: package-runtime
env:
- name: HTTP_PROXY
value: "<http-proxy-url>"
- name: HTTPS_PROXY
value: "<https-proxy-url>"
- name: NO_PROXY
value: "<no-proxy-list>"
volumeMounts:
- mountPath: /etc/ssl/certs/ca-certificates.crt
name: cert-map
subPath: cert
readOnly: true
- name: cache
mountPath: /cache
volumes:
- name: cert-map
configMap:
name: cert-map
defaultMode: 420Replace each placeholder as follows.
- Replace
<http-proxy-url>with your HTTP proxy URL, for example,http://proxy.example.com:8080. - Replace
<https-proxy-url>with your HTTPS proxy URL. - Replace
<no-proxy-list>with a comma-separated list of hosts and domains that must bypass the proxy.
If you used a
Secretin the previous step, replace theconfigMapblock undervolumeswith asecretblock that references the same name. - Replace
-
Reference the
DeploymentRuntimeConfigfrom yourProviderresource by settingspec.runtimeConfigRef.name.apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
name: provider-palette
spec:
package: xpkg.upbound.io/crossplane-contrib/provider-palette:<provider-version>
runtimeConfigRef:
name: palette-provider-runtimeReplace
<provider-version>with the Palette Crossplane provider version you want to install. Refer to the Palette Provider page for available versions. -
Apply the manifests to your cluster.
If you defined the resources in three separate manifests, run the following command for each manifest file.
kubectl apply --filename <manifest-file>.yaml
After the provider pod restarts, the CA certificate is mounted at /etc/ssl/certs/ca-certificates.crt and the proxy
environment variables are available to the provider process.
Get Started
You can use the Palette Crossplane Provider to deploy Kubernetes clusters on supported public cloud, data center, and bare metal infrastructures. For examples of end-to-end cluster provisioning with Crossplane, review the following guides:
- Deploy an AWS IaaS Cluster with Crossplane
- Deploy an Azure IaaS Cluster with Crossplane
- Deploy a GCP IaaS Cluster with Crossplane