qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Andrea Bolognani <abologna@redhat.com>
To: libvir-list@redhat.com, qemu-devel@nongnu.org
Cc: vromanso@redhat.com, rmohr@redhat.com, crobinso@redhat.com
Subject: [RFC DOCUMENT 10/12] kubevirt-and-kvm: Add Upgrades page
Date: Wed, 16 Sep 2020 18:55:45 +0200	[thread overview]
Message-ID: <e795a9ff0e52695368b5dc2cf1e326c8c45ccada.camel@redhat.com> (raw)
In-Reply-To: <a6b5e34843b3f08994d4ffefadc5867001e0bc36.camel@redhat.com>

https://gitlab.com/abologna/kubevirt-and-kvm/-/blob/master/Upgrades.md

# Upgrades

The KubeVirt installation and upgrade process are entirely controlled
by an [operator][], which is a common pattern in the Kubernetes
world. The operator is a piece of software running in the cluster and
managing the lifecycle of other components, in this case KubeVirt.

## The operator

What it does:

* Manages the whole KubeVirt installation
* Keeps the cluster actively in sync with the desired state
* Upgrades KubeVirt with zero downtime

## Installation

Install the operator:

```bash
$ LATEST=$(curl -L https://storage.googleapis.com/kubevirt-prow/devel/nightly/release/kubevirt/kubevirt/latest)
$ kubectl apply -f https://storage.googleapis.com/kubevirt-prow/devel/nightly/release/kubevirt/kubevirt/$(LATEST)/kubevirt-operator.yaml
$ kubectl get pods -n kubevirt
NAME                                      READY   STATUS    RESTARTS   AGE
virt-operator-58cf9d6648-c7qph            1/1     Running   0          69s
virt-operator-58cf9d6648-pvzw2            1/1     Running   0          69s
```

Trigger the installation of KubeVirt:

```bash
$ LATEST=$(curl -L https://storage.googleapis.com/kubevirt-prow/devel/nightly/release/kubevirt/kubevirt/latest)
$ kubectl apply -f https://storage.googleapis.com/kubevirt-prow/devel/nightly/release/kubevirt/kubevirt/${LATEST}/kubevirt-cr.yaml
$ kubectl get pods -n kubevirt
NAME                                      READY   STATUS    RESTARTS   AGE
virt-api-8bdd88557-fllhr                  1/1     Running   0          59s
virt-controller-55ccb8cdcb-5rtp6          1/1     Running   0          43s
virt-controller-55ccb8cdcb-v8kr9          1/1     Running   0          43s
virt-handler-67pns                        1/1     Running   0          43s
```

The process happens in two steps because the operator relies on the
KubeVirt [custom resource][] for information on the desired
installation, and will not do anything until that resource exists in
the cluster.

## Upgrade

The upgrading process is similar:

* Install the latest operator
* Reference the new version in the KubeVirt CustomResource to trigger
  the actual upgrade

```bash
$ kubectl.sh get kubevirt -n kubevirt kubevirt -o yaml
apiVersion: kubevirt.io/v1alpha3
kind: KubeVirt
metadata:
  name: kubevirt
spec:
  imageTag: v0.30
  certificateRotateStrategy: {}
  configuration: {}
  imagePullPolicy: IfNotPresent
```

Note the `imageTag` attribute: when present, the KubeVirt operator
will take steps to ensure that the version of KubeVirt that's
deployed on the cluster matches its value, which in our case will
trigger an upgrade.

The following chart explain the upgrade flow in more detail and shows
how the various components are affected:

![KubeVirt upgrade flow][Upgrades-Kubevirt]

KubeVirt is released as a complete suite: no individual
`virt-launcher` releases are planned. Everything is tested together,
everything is released together.

## QEMU and libvirt

The versions of QEMU and libvirt used for VMs are also tied to the
version of KubeVirt and are upgraded along with everything else.

* Migrations from old libvirt/QEMU to new libvirt/QEMU pairs are
  possible
* As soon as the new `virt-handler` and the new controller are rolled
  out, the cluster will only start VMIs with the new QEMU/libvirt
  versions

## Version compatibility

The virt stack is updated along with KubeVirt, which mitigates
compatibility concerns. As a rule of thumb, versions of QEMU and
libvirt older than a year or so are not taken into consideration.

Currently, the ability to perform backwards migation (eg. from a
newer version of QEMU to an older one) is not necessary, but that
could very well change as KubeVirt becomes more widely used.

[Upgrades-Kubevirt]: https://gitlab.com/abologna/kubevirt-and-kvm/-/blob/master/Images/Upgrades-Kubevirt.png
[custom resource]: https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/
[operator]: https://kubernetes.io/docs/concepts/extend-kubernetes/operator/



  parent reply	other threads:[~2020-09-16 16:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-16 16:44 [RFC DOCUMENT 00/12] kubevirt-and-kvm: Add documents Andrea Bolognani
2020-09-16 16:45 ` [RFC DOCUMENT 01/12] kubevirt-and-kvm: Add Index page Andrea Bolognani
2020-09-16 16:46 ` [RFC DOCUMENT 02/12] kubevirt-and-kvm: Add Components page Andrea Bolognani
2020-09-16 16:47 ` [RFC DOCUMENT 03/12] kubevirt-and-kvm: Add Hotplug page Andrea Bolognani
2020-09-16 16:48 ` [RFC DOCUMENT 04/12] kubevirt-and-kvm: Add Storage page Andrea Bolognani
2020-09-16 16:50 ` [RFC DOCUMENT 05/12] kubevirt-and-kvm: Add Networking page Andrea Bolognani
2020-09-16 16:51 ` [RFC DOCUMENT 06/12] kubevirt-and-kvm: Add Live Migration page Andrea Bolognani
2020-09-16 16:52 ` [RFC DOCUMENT 07/12] kubevirt-and-kvm: Add CPU Pinning page Andrea Bolognani
2020-09-16 16:53 ` [RFC DOCUMENT 08/12] kubevirt-and-kvm: Add NUMA " Andrea Bolognani
2020-09-16 16:54 ` [RFC DOCUMENT 09/12] kubevirt-and-kvm: Add Isolation page Andrea Bolognani
2020-09-16 16:55 ` Andrea Bolognani [this message]
2020-09-16 16:56 ` [RFC DOCUMENT 11/12] kubevirt-and-kvm: Add Backpropagation page Andrea Bolognani
2020-09-16 16:57 ` [RFC DOCUMENT 12/12] kubevirt-and-kvm: Add Contacts page Andrea Bolognani
2020-09-22  9:29 ` [RFC DOCUMENT 00/12] kubevirt-and-kvm: Add documents Philippe Mathieu-Daudé
2020-09-24 18:31   ` Andrea Bolognani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e795a9ff0e52695368b5dc2cf1e326c8c45ccada.camel@redhat.com \
    --to=abologna@redhat.com \
    --cc=crobinso@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rmohr@redhat.com \
    --cc=vromanso@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).