Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE: Support for Nested OCP clusters in disconnected environments. #770

Open
ElCoyote27 opened this issue Jan 8, 2025 · 0 comments
Open

Comments

@ElCoyote27
Copy link
Contributor

ElCoyote27 commented Jan 8, 2025

Context: I am trying to use https://github.com/karmab/kcli/blob/main/extras/kubevirt-pod.yml to create an OCP cluster (Nested) on a disconnected baremetal OCP clusters.

I've mirrored to the following images to the local quay:

images="karmab/curl:multi \
karmab/kcli:latest \
karmab/origin-coredns:multi \
karmab/haproxy:multi \
karmab/origin-keepalived-ipfailover:multi \
karmab/mdns-publisher:multi \
karmab/kubectl:multi"

I've made the following changes to the above yaml:

$ diff -b kubevirt-pod.yml.orig kubevirt-pod.yml
32c32
<     image: quay.io/karmab/kcli:latest
---
>     image: central-quay-mvp1.vimv2.ecocenter.fr/ocp4/karmab/kcli
62c62
<       kcli -n $NAMESPACE create cluster openshift -P pull_secret=/etc/pull-secret/pull-secret -P sno_vm=true -P numcpus=$NUMCPUS -P memory=$MEMORY -P service_network_ipv4=$SERVICE_NETWORK_IPV4 -P cluster_network_ipv4=$CLUSTER_NETWORK_IPV4 $CLUSTER
---
>       kcli -n $NAMESPACE create cluster openshift -P pull_secret=/etc/pull-secret/.dockerconfigjson -P sno_vm=true -P numcpus=$NUMCPUS -P memory=$MEMORY -P tag=4.16.4 -P disconnected_url=central-quay-mvp1.vimv2.ecocenter.fr/ocp4 -P disconnected_user=OBFUSCATED -P disconnected_password=OBFUSCATED -P service_network_ipv4=$SERVICE_NETWORK_IPV4 -P cluster_network_ipv4=$CLUSTER_NETWORK_IPV4 $CLUSTER

The result was this:

$ oc apply -f kubevirt-pod.yml
serviceaccount/kcli unchanged
rolebinding.rbac.authorization.k8s.io/kcli-rolebinding unchanged
pod/kubevirt-kcli created


$ oc logs kubevirt-kcli
Deploying on client local
Deploying cluster testk8
sno_disk will be discovered
Using stable version
Downloading oc in current directory

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
chmod: cannot access 'oc': No such file or directory
Downloading openshift-install from https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.16.4
Couldn't open url https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.16.4
Couldn't download openshift-install
error: error reading /root/.kcli/clusters/testk8/auth/kubeconfig.ext: no such file or directory

The pull secret was also a challenge, I ended up copying the one from openshift-config to the 'default' namespace and I had to change /etc/pull-secret/pull-secret to /etc/pull-secret/.dockerconfigjson as a result (I wasn't sure how to create /etc/pull-secret/pull-secret to way it was expected)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant