Closed jichenjc closed 3 years ago
Looks like somewhere the RBAC role aren't being generated properly anymore. I would check to see if the code still has the proper // +kubebuilder
go comments on the controlplane/nested/controllers/
directory. This should declare that a statefulset permission is needed.
/kind bug
/retitle 🐛 Permission Errors trying to create StatefulSet from NCP
/assign
It appears this happens because we don't have the serviceAccountName in the Deployment
specs as I'm currently doing #61 and experiencing the same issue.
/reopen
@christopherhein thanks for the PR, however, I updated to latest code , follow the same doc and still get same issue , I am trying to manually apply the rbac and got following
"config/rbac/service_account.yaml": namespaces "system" not found
which makes me curious seems there is no system
ns defined at all?
@jichenjc: Reopened this issue.
@jichenjc thanks for reopening. Use case wise if I changed this doc to be the published prod images instead of you needing to generate those images from scratch would that suffice for your use case or are you looking for developer docs?
I think we need both but I'm actively working on #54 and which will make this doc even lighter along with that we have published images and manifests as of today. So if you want to just get a working example you can download https://github.com/kubernetes-sigs/cluster-api-provider-nested/releases/download/v0.1.0/cluster-api-provider-nested-components.yaml and apply that to get the CAPN bits deployed and as of today you can download the v0.4
clusterctl
binary so that could be updated.
@jichenjc thanks for reopening. Use case wise if I changed this doc to be the published prod images instead of you needing to generate those images from scratch would that suffice for your use case or are you looking for developer docs?
I think we need both but I'm actively working on #54 and which will make this doc even lighter along with that we have published images and manifests as of today. So if you want to just get a working example you can download https://github.com/kubernetes-sigs/cluster-api-provider-nested/releases/download/v0.1.0/cluster-api-provider-nested-components.yaml and apply that to get the CAPN bits deployed and as of today you can download the
v0.4
clusterctl
binary so that could be updated.
thanks for the detailed info , appreciate~ I will re-try based on your comments and get back here, thanks
Hopefully that all worked for you, we just merged https://github.com/kubernetes-sigs/cluster-api/pull/4792 so if you want we can repivot this issue to be about updating the docs/README.md
to use the published deployment route, wdyt?
Thanks for the info, will validate with more tries later on ,currently having following error and will retry after clean up env
# clusterctl init --core cluster-api:v0.4.0-beta.0 --control-plane nested:v0.1.0 --infrastructure nested:v0.1.0 -v 66
No default config file available
Fetching providers
Fetching File="core-components.yaml" Provider="cluster-api" Type="CoreProvider" Version="v0.4.0-beta.0"
Fetching File="bootstrap-components.yaml" Provider="kubeadm" Type="BootstrapProvider" Version="v0.3.19"
Fetching File="control-plane-components.yaml" Provider="nested" Type="ControlPlaneProvider" Version="v0.1.0"
Fetching File="infrastructure-components.yaml" Provider="nested" Type="InfrastructureProvider" Version="v0.1.0"
Fetching File="metadata.yaml" Provider="cluster-api" Type="CoreProvider" Version="v0.4.0-beta.0"
Fetching File="metadata.yaml" Provider="kubeadm" Type="BootstrapProvider" Version="v0.3.19"
Error: current version of clusterctl could install only v1alpha4 providers, detected v1alpha3 for provider bootstrap-kubeadm
sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster.(*providerInstaller).getProviderContract
/root/cluster-api-provider-nested/cluster-api/cmd/clusterctl/client/cluster/installer.go:177
sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster.(*providerInstaller).Validate
/root/cluster-api-provider-nested/cluster-api/cmd/clusterctl/client/cluster/installer.go:129
sigs.k8s.io/cluster-api/cmd/clusterctl/client.(*clusterctlClient).Init
/root/cluster-api-provider-nested/cluster-api/cmd/clusterctl/client/init.go:102
sigs.k8s.io/cluster-api/cmd/clusterctl/cmd.runInit
/root/cluster-api-provider-nested/cluster-api/cmd/clusterctl/cmd/init.go:139
sigs.k8s.io/cluster-api/cmd/clusterctl/cmd.glob..func11
/root/cluster-api-provider-nested/cluster-api/cmd/clusterctl/cmd/init.go:84
github.com/spf13/cobra.(*Command).execute
/root/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:852
github.com/spf13/cobra.(*Command).ExecuteC
/root/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:960
github.com/spf13/cobra.(*Command).Execute
/root/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:897
sigs.k8s.io/cluster-api/cmd/clusterctl/cmd.Execute
/root/cluster-api-provider-nested/cluster-api/cmd/clusterctl/cmd/root.go:93
main.main
/root/cluster-api-provider-nested/cluster-api/cmd/clusterctl/main.go:25
runtime.main
/usr/local/go/src/runtime/proc.go:225
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1371
Since 0.4.0 isn't fully released try adding this file:
→ cat ~/.cluster-api/dev-repository/config.yaml
---
providers:
- name: "cluster-api"
url: "https://github.com/kubernetes-sigs/cluster-api/releases/v0.4.0-beta.0/core-components.yaml"
type: "CoreProvider"
- name: "kubeadm"
url: "https://github.com/kubernetes-sigs/cluster-api/releases/v0.4.0-beta.0/bootstrap-components.yaml"
type: "BootstrapProvider"
And then try using:
→ clusterctl init --core cluster-api:v0.4.0-beta.0 --control-plane nested:v0.1.0 --infrastructure nested:v0.1.0 --config ~/.cluster-api/dev-repository/config.yaml
Also, this route still needs to be build off main
for CAPI.
If that doesn't work check out https://cluster-api.sigs.k8s.io/clusterctl/developers.html to see if there are more steps missing. I was able to as long as I added the v0.4.0
binaries to the dev-repository/config
.
@vincepri potentially you have a better way of using v0.4.0
binaries for CAPI from clusterctl
.
/retitle 📖 Update docs/README.md with beta clusterctl setup
/unassign
This should be much easier now:
# Create Cluster
kind create cluster --name=capn
# Get unreleased clusterctl
git clone git@github.com:kubernetes-sigs/cluster-api.git
cd cluster-api
make clusterctl
# Create Dev Repo
mkdir -p ~/.cluster-api/dev-repository/
# Update config for CAPI Beta
cat <<EOF >>~/.cluster-api/dev-repository/config.yaml
---
providers:
- name: "cluster-api"
url: "https://github.com/kubernetes-sigs/cluster-api/releases/v0.4.0-beta.0/core-components.yaml"
type: "CoreProvider"
- name: "kubeadm"
url: "https://github.com/kubernetes-sigs/cluster-api/releases/v0.4.0-beta.0/bootstrap-components.yaml"
type: "BootstrapProvider"
EOF
# Init Cluster API
./bin/clusterctl init --core cluster-api:v0.4.0-beta.0 --control-plane nested:v0.1.0 --infrastructure nested:v0.1.0 --config ~/.cluster-api/dev-repository/config.yaml
# Set Name
export CLUSTER_NAME=cluster-sample
./bin/clusterctl generate cluster ${CLUSTER_NAME} --infrastructure=nested:v0.1.0 | kubectl apply -f -
# Get kubeconfig
./bin/clusterctl get kubeconfig ${CLUSTER_NAME} > kubeconfig
# Port Forward Cluster
kubectl port-forward svc/${CLUSTER_NAME}-apiserver 6443:6443
# Update /etc/hosts
127.0.0.1 ${CLUSTER_NAME}-apiserver
# Get resources; Profit 🎉
kubectl --kubeconfig kubeconfig get all -A
/help
@christopherhein: This request has been marked as needing help from a contributor.
Please ensure the request meets the requirements listed here.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help
command.
We're looking for someone to use the information from https://github.com/kubernetes-sigs/cluster-api-provider-nested/issues/105#issuecomment-860072112 to update docs/README.md
so that the new quick start guide uses the current unreleased clusterctl
and is more reliable.
/assign
I am working on this ,will provide an update soon
I can move to here already, so should be good now
root@jitest19:~/cluster-api-provider-nested# kubectl --kubeconfig kubeconfig get all -A
NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
default service/kubernetes ClusterIP 10.32.0.1 <none> 443/TCP 2d1h
follow this https://github.com/kubernetes-sigs/cluster-api-provider-nested/tree/main/docs (latest code)
and seems the control pane not startup correctly
any guide in fixing this? thanks