Kubernetes-native declarative infrastructure for Cox Edge.
The Cluster API brings declarative, Kubernetes-style APIs to cluster creation, configuration and management. The API itself is shared across multiple cloud providers allowing for true Cox Edge hybrid deployments of Kubernetes.
This provider's versions are compatible with the following versions of Cluster API:
Cluster API v1alpha4 (v0.4) | Cluster API v1beta1 (v1.x) | |
---|---|---|
Cox Edge v1beta1 (v0.5.x) |
☓ | ✓ |
-
GO version should be greater than or equal to
1.13
-
Ensure that you have
make
installed. -
Ensure that you have the latest
git
version. -
You will need to update your clusterctl config to be able to discover the provider, which is located by default ~/.cluster-api/clusterctl.yaml.
providers:
# Add the cox infrastructure provider to the clusterctl config for discovery
- name: coxedge
type: InfrastructureProvider
url: https://github.com/coxedge/cluster-api-provider-coxedge/releases/v0.5.5/infrastructure-components.yaml
- Ensure that the Cox provider has the required credentials. You will need to add your credentials in the examples/coxcluster.yaml file.
stringData:
COX_API_KEY: <YOUR API KEY>
COX_SERVICE: edge-service
COX_ENVIRONMENT: <ENVIRONMENT NAME>
# By default COX_ORGANIZATION is commented. If you have an Organization ID, then and only then uncomment the same and fill in the ID.
# COX_ORGANIZATION: <ORGANIZATION ID>
- You will also need to fill in your ssh key in the examples/coxcluster.yaml file at lines 190 and 244.
sshAuthorizedKeys:
- # Please fill in your ssh key as this is a required field.
- Ensure your nodes persistent volumes are created with appropriate size and mount path in in the examples/coxcluster.yaml file at lines 194 through 196 for master nodes and 255 through 257 for workers. Note max 7 volumes can be created with max size of 1000GB each.
persistentStorages:
- path: "/var/lib/mnt1"
size: "10"
kind create cluster
clusterctl init --infrastructure coxedge
kubectl apply -f examples/coxcluster.yaml
NOTE: If you make changes to the CAPI Provider and want to test them locally, then the below steps will help you in accomplishing this. These are optional steps and can be ignored.
Change REGISTRY
and IMAGE_NAME
according to your setup
make docker-build && make docker-push
make release-manifests-clusterctl
kubectl apply -f build/releases/infrastructure-cox/latest/infrastructure-components.yaml
kubectl apply -f examples/coxcluster.yaml
NOTE: You will need to install Pod Security Policies and CNI before using/accessing the cluster.
clusterctl get kubeconfig <cluster-name> -n default > coxcluster.kubeconfig
export KUBECONFIG=coxcluster.kubeconfig
NOTE: Please ensure that you are on your target cluster before executing the below commands for installing CNI and PodSecurityPolicies.
kubectl apply -f examples/podsecuritypolicies.yaml
kubectl apply -f examples/cni.yaml
For installing CSI, please refer to Longhorn installation guide.
kubectl get cluster
clusterctl describe cluster <cluster_name>
Document providing steps to publish a release is provided here.