<a id="co-upgrade-c3"></a>

# Migrate to and Upgrade Control Center

Plan Confluent Control Center (Legacy) migration and Control Center upgrades alongside your Confluent Platform upgrade. Confluent Platform
8.0 replaces Confluent Control Center (Legacy) with Control Center, so when you move to Confluent Platform 8.0, migrate Confluent Control Center (Legacy)
alerts to Control Center and upgrade Control Center from 2.0 or 2.1 to 2.2.

<a id="co-upgrade-considerations-c3"></a>

## Migrate Confluent Control Center (Legacy) alerts to Control Center

Starting in Confluent Platform 8.0, Confluent Platform no longer supports Confluent Control Center (Legacy). Migrate your Confluent Control Center (Legacy) alerts
to Control Center before upgrading to Confluent Platform 8.0.

You cannot upgrade Confluent Control Center (Legacy) to Control Center directly, and you cannot migrate Confluent Control Center (Legacy)
metrics to Control Center.

### Prerequisites

- Confluent Platform version is 7.9.1. If not, upgrade Confluent Platform first as described in
  Step 1.
- Control Center is deployed alongside Confluent Control Center (Legacy) so you can migrate alerts between
  them. If you do not already have a Control Center instance, see
  [Deploy Confluent Control Center](co-deploy-cp.md#co-deploy-c3) to deploy one.
- Apache Kafka® bootstrap endpoint used by your existing Confluent Control Center (Legacy) deployment.

### Step 1: Upgrade Confluent Platform to 7.9.1

If you are not already on Confluent Platform 7.9.1, upgrade to that version. For
example, update the image tag on each deployed component CR:

```yaml
spec:
  image:
    application: confluentinc/cp-server:7.9.1
```

For the complete procedure, including deployment-mode detection and
component upgrade order, see [Upgrade Confluent Platform Using Confluent for Kubernetes](co-upgrade-cp.md#co-upgrade-cp).

### Step 2: Point Confluent Control Center (Legacy) and Control Center at the same Kafka cluster

Configure Confluent Control Center (Legacy) and Control Center with the same Kafka bootstrap endpoint so they share
the same Kafka cluster. You can only migrate alerts between Confluent Control Center (Legacy) and Control Center
instances pointing at the same cluster. For example, if your `ControlCenter`
(Confluent Control Center (Legacy)) CR uses this endpoint:

```yaml
kind: ControlCenter
metadata:
  name: controlcenter
spec:
  dependencies:
    kafka:
      bootstrapEndpoint: http://kafka.<namespace>.svc.cluster.local:9071
```

Configure your Control Center `ControlCenter` CR with the identical endpoint:

```yaml
kind: ControlCenter
metadata:
  name: controlcenternextgen
spec:
  dependencies:
    kafka:
      bootstrapEndpoint: http://kafka.<namespace>.svc.cluster.local:9071
```

### Step 3: Migrate the alerts

Use the Confluent Control Center (Legacy) Representational State Transfer (REST) API to migrate alerts
to Control Center. Set up port forwarding to your Control Center pod, then call the
migration endpoints:

```bash
kubectl port-forward controlcenternextgen-0 9021:9021 -n <namespace>
```

Migrate the alert triggers:

```bash
curl --location --request POST 'http://localhost:9021/3.0/alerts/triggers/migrate-triggers'
```

Expected: `200 OK` with no response body.

Verify the trigger migration status:

```bash
curl --location 'http://localhost:9021/3.0/alerts/triggers/migration/status'
```

Expected: `{"status":"success"}`.

Migrate the alert actions:

```bash
curl --location --request POST 'http://localhost:9021/3.0/alerts/actions/migrate-actions'
```

Expected: `200 OK` with no response body.

Verify the action migration status:

```bash
curl --location 'http://localhost:9021/3.0/alerts/actions/migration/status'
```

Expected: `{"status":"success"}`.

For role-based access control (RBAC)-enabled systems, include an
authorization header on each request:

```bash
curl --location --request POST 'http://localhost:9021/3.0/alerts/triggers/migrate-triggers' \
  --header 'authorization: Bearer <authorization-token>'
```

For more information, see [Control Center Alert Migration](https://docs.confluent.io/control-center/current/installation/alert-migrate.html).

### Step 4: Upgrade Confluent Platform to 8.0 and Control Center to 2.2

Upgrade your Confluent Platform deployment to 8.0 and Control Center to 2.2. For example, update
the Control Center image tags:

```yaml
kind: ControlCenter
spec:
  image:
    application: confluentinc/cp-enterprise-control-center-next-gen:2.2.0
  services:
    prometheus:
      image: confluentinc/cp-enterprise-prometheus:2.2.0
    alertmanager:
      image: confluentinc/cp-enterprise-alertmanager:2.2.0
```

KRaft-based Confluent Platform deployments must upgrade Control Center *before* Kafka. For the
complete step-by-step order, see [Upgrade to Confluent Platform 8.0
with Control Center Next Gen](co-upgrade-cp.md#co-upgrade-cp-kraft-steps-8-0).

### Verify

In Control Center, navigate to **Alerts** and confirm the migrated alerts appear as
expected.

<a id="id1"></a>

## Upgrade Control Center from 2.0 or 2.1 to 2.2 in Confluent Platform 8.0

This section restates the preceding Step 4 as a standalone reference for
readers who do not use Control Center (Legacy) and so do not need the alert migration
steps.
If you already completed Step 4, you can skip this section.

Confluent Platform 8.0 does not work with Control Center 2.0 or 2.1. When upgrading a KRaft-based
Confluent Platform deployment to 8.0 and Control Center to 2.2, upgrade Control Center *before* upgrading
Kafka. For step-by-step
instructions, see [Upgrade to Confluent Platform 8.0 with Control Center
Next Gen](co-upgrade-cp.md#co-upgrade-cp-kraft-steps-8-0).

## Next steps

- See [Upgrade Confluent Platform Using Confluent for Kubernetes](co-upgrade-cp.md#co-upgrade-cp) for the full Confluent Platform upgrade procedure.
- See [Pre-upgrade tasks and known issues](co-upgrade-considerations.md#co-upgrade-additional-considerations) for component-specific
  upgrade tasks and known issues.
