Skip to content
This repository was archived by the owner on Oct 28, 2024. It is now read-only.

⚠️ Moving Control Plane Provider and Infra Provider #57

Conversation

christopherhein
Copy link
Contributor

This PR separates the Control Plane Provider from the Infrastructure provider allowing them to be deployed separately which will help us down the line if we end up wanting to support #44 but also helps us to better the experience for clusterctl once we get our first release out to help fulfill #54.

Testable Steps

Create kind cluster

kind create cluster

Install cert-manager

kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.3.1/cert-manager.yaml

Clone CAPI and Deploy Dev release

We need to deploy the unreleased version of CAPI for v1alpha4 API support.

git clone [email protected]:kubernetes-sigs/cluster-api.git
cd cluster-api
make release-manifests
# change feature flags on core
sed -i'' -e 's@- --feature-gates=.*@- --feature-gates=MachinePool=false,ClusterResourceSet=true@' out/core-components.yaml
kubectl apply -f out/core-components.yaml

Create Docker Images, Manifests and Load Images

export PULL_POLICY=Never
export TAG=dev
make docker-build release-manifests
kind load docker-image gcr.io/cluster-api-nested-controller-amd64:dev
kind load docker-image gcr.io/nested-controlplane-controller-amd64:dev

Deploy CAPN

kubectl apply -f out/cluster-api-provider-nested-components.yaml

Apply Sample Cluster

kubectl apply -f config/samples/

Get KUBECONFIG

clusterctl get kubeconfig cluster-sample > kubeconfig

Port Forward

In a separate shell, you will need to port-forward the apiserver service.

kubectl port-forward svc/cluster-sample-apiserver 6443:6443

Connect to Cluster

To use the KUBECONFIG without modification we first need to setup a host record for the
apiserver service name, to do this we can append that to /etc/hosts

cat /etc/hosts
# Normal hosts file
127.0.0.1 cluster-sample-apiserver

Connect to the Cluster! 🎉

kubectl --kubeconfig kubeconfig get all -A

Related

Closes #45

Signed-off-by: Chris Hein [email protected]

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: christopherhein

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot requested review from adohe and Fei-Guo May 17, 2021 21:31
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 17, 2021
@christopherhein
Copy link
Contributor Author

/cc @vincepri we chatted about this before and we didn't get the first workable version out before we did this reorganization.

@christopherhein
Copy link
Contributor Author

/assign @charleszheng44 @Fei-Guo

@christopherhein
Copy link
Contributor Author

@charleszheng44 the description of this PR has most of the steps laid out for the initial tutorial, I didn't write these up in docs yet if you'd still like to do that for #52

@Fei-Guo
Copy link

Fei-Guo commented May 17, 2021

LGTM

@charleszheng44
Copy link
Contributor

@charleszheng44 the description of this PR has most of the steps laid out for the initial tutorial, I didn't write these up in docs yet if you'd still like to do that for #52

Yes. I will try this out and write up the tutorial for the first release.

@charleszheng44
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 18, 2021
@k8s-ci-robot k8s-ci-robot merged commit fefd213 into kubernetes-retired:master May 18, 2021
@christopherhein christopherhein deleted the chore/move-controlplane branch June 9, 2021 16:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

⚠️ Move controlplane.cluster.x-k8s.io components to controlplane/
4 participants