Skip to content

Commit 59db5b3

Browse files
committed
Replace MPR chartmuseum by OCI
Signed-off-by: Thomas Coudert <[email protected]>
1 parent 9864f51 commit 59db5b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+3731
-5201
lines changed

pages/public_cloud/containers_orchestration/managed_private_registry/deploy-chart-from-registry-in-kubernetes/guide.de-de.md

+39-135
Original file line numberDiff line numberDiff line change
@@ -5,195 +5,97 @@ kb: Public Cloud
55
category_l1: Containers & Orchestration
66
category_l2: Managed Private Registry
77
category_l3: Tutorials
8-
updated: 2022-04-14
8+
updated: 2023-11-20
99
---
1010

11-
OVHcloud Managed Private Registry service is a composite cloud-native registry which supports both container image management and [Helm](https://helm.sh/){.external} [chart](https://helm.sh/docs/topics/charts/){.external} management.
11+
OVHcloud Managed Private Registry service is a composite cloud-native registry which supports both container image management and [Helm](https://helm.sh/){.external} [chart](https://helm.sh/docs/topics/charts/){.external} management.
1212

1313
This guide will explain how to deploy a Helm chart from your OVHcloud Managed Private Registry in a Kubernetes cluster.
1414

1515
## Before you begin
1616

1717
This tutorial presupposes that you already have a working OVHcloud Managed Kubernetes cluster, and some basic knowledge of how to operate it. If you want to know more on those topics, please look at the [deploying a Hello World application](/pages/public_cloud/containers_orchestration/managed_kubernetes/deploying-hello-world) documentation. You will need to have Helm installed on your cluster (see the [installing helm](/pages/public_cloud/containers_orchestration/managed_kubernetes/installing-helm) guide for more information).
1818

19-
You also need to have a working OVHcloud Managed Private Registry and have followed the guide on [managing Helm charts in the OVHcloud Managed Private Registry](/pages/public_cloud/containers_orchestration/managed_private_registry/using-helm-chart-museum).
19+
You also need to have a working OVHcloud Managed Private Registry and have followed the guide on [managing Helm charts in the OVHcloud Managed Private Registry](/pages/public_cloud/containers_orchestration/managed_private_registry/using-helm-charts).
2020

21-
You should have at least one wordpress Helm chart in your Private Registry:
21+
After following the previous guide, you should have at least one Wordpress Helm chart in your Managed Private Registry:
2222

2323
![Helm charts in OVHcloud Managed Private Registry](images/helm-chart-in-ovh-private-registry.png)
2424

2525
## Prerequisites
2626

27-
We (the OVHcloud Managed Kubernetes Service team) are working on a patch to be released in early 2022. In the meantime, please remove the default storage class and install the new one.
27+
### Install Helm v3.8+
2828

29-
- Delete the concerned `StorageClass` that you are using by default
29+
Check if Helm is installed in the required version:
3030

3131
```bash
32-
kubectl delete storageclasses.storage.k8s.io csi-cinder-high-speed
33-
```
34-
35-
It will delete the existing `StorageClass`:
36-
37-
```console
38-
$ kubectl delete storageclasses.storage.k8s.io csi-cinder-high-speed
39-
storageclass.storage.k8s.io "csi-cinder-high-speed" deleted
40-
```
41-
42-
- Create a new `StorageClass` with the required fix
43-
44-
```bash
45-
kubectl apply -f https://raw.githubusercontent.com/ovh/docs/develop/pages/public_cloud/containers_orchestration/managed_kubernetes/fix-persistent-volumes-permissions/files/fixed-cinder-high-speed-storage-class.yaml
46-
```
47-
48-
It will apply the correct `StorageClass` YAML manifest:
49-
50-
```console
51-
$ kubectl apply -f https://raw.githubusercontent.com/ovh/docs/develop/pages/public_cloud/containers_orchestration/managed_kubernetes/fix-persistent-volumes-permissions/files/fixed-cinder-high-speed-storage-class.yaml
52-
storageclass.storage.k8s.io/csi-cinder-high-speed created
53-
```
54-
55-
If you have already installed a previous version of Bitnami's WordPress Helm chart, please follow the following step by step guide.
56-
57-
- Delete the concerned Helm Chart
58-
59-
For example with the Helm Chart `wordpress` which is concerned by this behavior:
60-
61-
```bash
62-
helm uninstall wordpress
63-
```
64-
65-
And don't forget to verify if concerned `PersistentVolumeClaim` (PVC) and `PersistentVolume` (PV) have been deleted before reinstalling the Helm Chart:
66-
67-
```bash
68-
kubectl get persistentvolumeclaims -A | grep wordpress
69-
kubectl get persistentvolumes
70-
```
71-
72-
If a `PersistentVolumeClaim` is listed, please delete it (the `PersistentVolume` will be deleted automatically).
73-
74-
```bash
75-
kubectl delete pvc data-my-first-k8s-wordpress-mariadb-0
32+
$ helm version
33+
version.BuildInfo{Version:"v3.12.0", GitCommit:"c9f554d75773799f72ceef38c51210f1842a1dea", GitTreeState:"clean", GoVersion:"go1.20.3"}
7634
```
7735

78-
The command will delete the remaining `PersistentVolumeClaim`:
79-
80-
```console
81-
$ kubectl delete pvc data-my-first-k8s-wordpress-mariadb-0
82-
persistentvolumeclaim "data-my-first-k8s-wordpress-mariadb-0" deleted
83-
```
36+
If the version is less than v3.8.0, follow the [official instructions](https://helm.sh/docs/intro/install/) to install Helm in latest version.
8437

8538
## Instructions
8639

8740
### Deploying a chart from your registry in Kubernetes
8841

89-
In this step you are going to deploy a chart from your OVHcloud Managed Private Registry into an OVHcloud Managed Kubernetes cluster (or any other Kubernetes cluster).
90-
91-
As indicated in the *Before you begin* section, you need to have `helm` installed in your cluster and a working `helm` CLI in your workstation (see the [installing Helm](/pages/public_cloud/containers_orchestration/managed_kubernetes/installing-helm) guide for more information if needed).
42+
#### Login to the OVHcloud Managed Private Registry
9243

93-
Run the command `helm version` to make sure the `helm` CLI is correctly installed locally.
94-
95-
```console
96-
$ helm version
97-
version.BuildInfo{Version:"v3.7.0", GitCommit:"eeac83883cb4014fe60267ec6373570374ce770b", GitTreeState:"clean", GoVersion:"go1.17"}
98-
```
99-
100-
#### Add your OVHcloud Managed Private Registry to the repository list
101-
102-
The first thing to do is add your OVHcloud Managed Private Registry to the Helm's repository list, with `helm repo add` command.
103-
104-
You can do it in two ways: adding your private registry as single index entry point or adding each project as a separate index entry point.
105-
106-
- Adding your OVHcloud Managed Private Registry as a unified single index entry point
107-
108-
In this mode, Helm will be able to use all the charts in any of your projects which are accessible by the currently authenticated user.
109-
44+
Before being able to pull or push Helm charts, login to Harbor:
11045

11146
```bash
112-
helm repo add --username <username> --password <password> <repo name> https://<repo url>/chartrepo
47+
helm registry login <registry url>
11348
```
11449

115-
- Adding a project in your OVHcloud Managed Private Registry as a separate index entry point
116-
117-
In this mode, Helm only can pull charts from the specified project.
118-
119-
```bash
120-
helm repo add --username <username> --password <password> <repo name> https://<repo url>/chartrepo/<project>
121-
```
122-
123-
In my example, I added the project in the private registry as a separate index entry point:
50+
For example:
12451

12552
```console
126-
$ helm repo add --username private-user --password xxxxxx privreg https://ab1cd23e.gra7.container-registry.ovh.net/chartrepo/private
127-
"privreg" has been added to your repositories
53+
$ helm registry login https://8xghzr01.c1.bhs5.container-registry.ovh.net
54+
Username: MbwQLGCglA
55+
Password:
56+
Login Succeeded
12857
```
12958

13059
#### Install charts
13160

132-
Before installing, make sure your the chart index is synchronized with the `helm repo update` command.
133-
134-
In my case:
135-
136-
```console
137-
$ helm repo update
138-
Hang tight while we grab the latest from your chart repositories...
139-
...Successfully got an update from the "gpu-helm-charts" chart repository
140-
...
141-
...Successfully got an update from the "privreg" chart repository
142-
...
143-
Update Complete. ⎈Happy Helming!⎈
144-
```
145-
146-
Look for your chart:
147-
148-
```bash
149-
helm search repo wordpress
150-
```
151-
152-
In my case, it finds several versions of WordPress chart, the official ones in the `bitnami` Helm repository, and the one in my `privreg` private registry project:
153-
154-
```console
155-
$ helm search repo wordpress
156-
NAME CHART VERSION APP VERSION DESCRIPTION
157-
bitnami/wordpress 13.2.1 5.9.3 WordPress is the world's most popular blogging ...
158-
bitnami/wordpress-intel 0.2.0 5.9.3 WordPress for Intel is the most popular bloggin...
159-
privreg/wordpress 13.1.4 5.9.2 WordPress is the world's most popular blogging ...
160-
```
161-
162-
Everything is ready, so now you can install the chart into your Kubernetes:
61+
Deploy the Wordpress Helm chart inside the Kubernetes cluster:
16362

16463
```bash
165-
helm install wordpress --username <username> --password <password> privreg/wordpress
64+
helm install myrelease oci://<registry url>/<project>/<chart name> --version <version>
16665
```
16766

16867
In my case:
16968

17069
```console
171-
$ helm install wordpress --username private-user --password xxxxxx privreg/wordpress
172-
NAME: wordpress
173-
LAST DEPLOYED: Thu Apr 14 09:33:33 2022
70+
$ helm install my-wordpress-release oci://8xghzr01.c1.bhs5.container-registry.ovh.net/private/wordpress --version 18.1.14
71+
72+
Pulled: 8xghzr01.c1.bhs5.container-registry.ovh.net/private/wordpress:18.1.14
73+
Digest: sha256:89afb47c221899db67c7b125f49394eecd078245181715337b5691a0ee199cb7
74+
NAME: my-wordpress-release
75+
LAST DEPLOYED: Mon Nov 20 17:46:16 2023
17476
NAMESPACE: default
17577
STATUS: deployed
17678
REVISION: 1
17779
TEST SUITE: None
17880
NOTES:
17981
CHART NAME: wordpress
180-
CHART VERSION: 13.1.4
181-
APP VERSION: 5.9.2
82+
CHART VERSION: 18.1.14
83+
APP VERSION: 6.4.1
18284

18385
** Please be patient while the chart is being deployed **
18486

18587
Your WordPress site can be accessed through the following DNS name from within your cluster:
18688

187-
wordpress.default.svc.cluster.local (port 80)
89+
my-wordpress-release.default.svc.cluster.local (port 80)
18890

18991
To access your WordPress site from outside the cluster follow the steps below:
19092

19193
1. Get the WordPress URL by running these commands:
19294

19395
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
194-
Watch the status with: 'kubectl get svc --namespace default -w wordpress'
96+
Watch the status with: 'kubectl get svc --namespace default -w my-wordpress-release'
19597

196-
export SERVICE_IP=$(kubectl get svc --namespace default wordpress --include "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}")
98+
export SERVICE_IP=$(kubectl get svc --namespace default my-wordpress-release --template "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}")
19799
echo "WordPress URL: http://$SERVICE_IP/"
198100
echo "WordPress Admin URL: http://$SERVICE_IP/admin"
199101

@@ -202,20 +104,22 @@ To access your WordPress site from outside the cluster follow the steps below:
202104
3. Login with the following credentials below to see your blog:
203105

204106
echo Username: user
205-
echo Password: $(kubectl get secret --namespace default wordpress -o jsonpath="{.data.wordpress-password}" | base64 --decode)
107+
echo Password: $(kubectl get secret --namespace default my-wordpress-release -o jsonpath="{.data.wordpress-password}" | base64 -d)
108+
206109
```
207110

208-
Check your WordPress is running correctly:
111+
Check WordPress is running correctly:
209112

210113
```console
211-
$ kubectl get pod -l app.kubernetes.io/instance=wordpress
212-
NAME READY STATUS RESTARTS AGE
213-
wordpress-8586785c5d-cttz4 1/1 Running 0 85s
214-
wordpress-mariadb-0 1/1 Running 0 85s
114+
$ kubectl get pod -l app.kubernetes.io/instance=my-wordpress-release
115+
NAME READY STATUS RESTARTS AGE
116+
my-wordpress-release-796cc4d6b8-ckb6c 1/1 Running 0 3m25s
117+
my-wordpress-release-mariadb-0 1/1 Running 0 3m25s
118+
215119
```
216120

217121
## Go further
218122

219123
To have an overview of the OVHcloud Managed Private Registry service, you can go to the [OVHcloud Managed Private Registry site](/products/public-cloud-containers-orchestration-managed-private-registry).
220124

221-
Join our community of users on <https://community.ovh.com/en/>.
125+
Join our community of users on <https://community.ovh.com/en/>.

0 commit comments

Comments
 (0)