Skip to content

Instantly share code, notes, and snippets.

@oshoval
Last active July 16, 2025 10:47
Show Gist options
  • Save oshoval/0068bb338663af115fd9509af329297c to your computer and use it in GitHub Desktop.
Save oshoval/0068bb338663af115fd9509af329297c to your computer and use it in GitHub Desktop.
Kcli 101
  1. Install kcli
    https://kcli.readthedocs.io/en/latest/index.html#deploying-kubernetes-openshift-clusters-and-applications-on-top

  2. Get a pull secret, save as openshift-pull-secret.json
    https://console.redhat.com/openshift/create/local

  3. Create a secondary network
    kcli create network -c 192.168.20.0/24 secondary

  4. Create this yaml, save as parameters.yml

cluster: multi-homing
domain: yourname.corp
version: nightly
tag: 4.14
ctlplanes: 3
workers: 2
memory: 24576
numcpus: 20
disk_size: 60
kubetype: openshift
network_type: OVNKubernetes
pull_secret: openshift-pull-secret.json
extra_networks:
- secondary
sslip: true
  • Notes:
  • sslip is a workaround for node's resolv.conf getting overwritten
  • A special pull secret is needed for nightly, you can use stable instead or get the secret.
  1. Create cluster kcli create cluster openshift --pf parameters.yml multi-homing

  2. Install kubevirt
    kcli create app openshift kubevirt-hyperconverged

  • Note: You can add this to the yaml, and it will include kubevirt in the install.
apps:
- kubevirt-hyperconverged

Thanks Karim Boumedhel for this wonderful tool.

@oshoval
Copy link
Author

oshoval commented Jul 9, 2024

In order to use a custom nightly (thanks Miguel)
kcli create kube openshift --paramfile parameters.yml multi-homing -P version=nightly -P tag=4.17.0-0.nightly-2024-07-09-012629

@RamLavi
Copy link

RamLavi commented Jul 10, 2024

got an error when starting the cluster:

Image rhcos-414.92.202402130420-0-openstack.x86_64.qcow2 not Added because Pool default not found
Pool default not found

This fixed it:

virsh pool-define /dev/stdin <<EOF
<pool type='dir'>
  <name>default</name>
  <target>
    <path>/var/lib/libvirt/images</path>
  </target>
</pool>
EOF

virsh pool-start default
virsh pool-autostart default

just as FYI

@oshoval
Copy link
Author

oshoval commented Jul 10, 2024

To delete kcli delete kube multi-homing
(will later update the main post)

@RamLavi
Copy link

RamLavi commented Aug 22, 2024

To deploy CNV nightly over the OCP deployed by KCLI, use the nightly pull-secret to delpoy OCP like decribed above, then use this knowledge base article to deploy CNV with OLM, BUT skip steps 1-6 since you already use the nightly pull-secret

@maiqueb
Copy link

maiqueb commented Aug 22, 2024

To deploy CNV nightly over the OCP deployed by KCLI, use the nightly pull-secret to delpoy OCP like decribed above, then use this knowledge base article to deploy CNV with OLM, BUT skip steps 1-6 since you already use the nightly pull-secret

This assumes you're using an OpenShift pull secret that already grants access to the CNV nightly repos - like the OpenShift QE pull secret.

@oshoval
Copy link
Author

oshoval commented Aug 28, 2024

Might worth please to update what worked for you at the end (i.e do use steps 1-5, 6 was a typo)

@RamLavi
Copy link

RamLavi commented Aug 28, 2024

Might worth please to update what worked for you at the end (i.e do use steps 1-5, 6 was a typo)

In the end I used 1-5 steps, using my quay. Starting from step 6, assuming that the nightly OpenShift pull secret will work seemlessly simply did not work for me. @o If you prefer I can update the original message inline if you prefer

@oshoval
Copy link
Author

oshoval commented Aug 29, 2024

Thanks, no rush for now
We will have soon an easier method for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment