Change registry
7 minute read
Changing Registry from A to B
KubeOps enables you to change the registry from A to B with following commands
kosi 2.6.0 - kosi 2.7.0
Kubeops 1.0.6
fileBeat
kosi pull kubeops/kosi-filebeat-os:1.2.0 -o filebeat.kosi -r 10.9.10.222:30003
kosi pull kubeops/kosi-filebeat-os:1.2.0 -o filebeat.kosi -r localhost:30003
kosi install -p filebeat.kosi
harbor
kosi pull kubeops/harbor:1.0.1 -o harbor.kosi -r 10.9.10.222:30003
kosi pull kubeops/harbor:1.0.1 -o harbor.kosi -r localhost:30003
kosi install -p harbor.kosi
logstash
kosi pull kubeops/kosi-logstash-os:1.0.1 -o logstash.kosi -r 10.9.10.222:30003
kosi pull kubeops/kosi-logstash-os:1.0.1 -o logstash.kosi -r localhost:30003
kosi install -p logstash.kosi
opa-gatekeeper
kosi pull kubeops/opa-gatekeeper:1.0.1 -o opa-gatekeeper.kosi -r 10.9.10.222:30003
kosi pull kubeops/opa-gatekeeper:1.0.1 -o opa-gatekeeper.kosi -r localhost:30003
kosi install -p opa-gatekeeper.kosi
opensearch
kosi pull kubeops/kosi-opensearch-os:1.0.3 -o opensearch.kosi -r 10.9.10.222:30003
kosi pull kubeops/kosi-opensearch-os:1.0.3 -o opa-gatekeeper.kosi -r localhost:30003
kosi install -p opa-gatekeeper.kosi
opensearch-dashboards
kosi pull kubeops/kosi-opensearch-dashboards:1.0.1 -o opensearch-dashboards.kosi -r 10.9.10.222:30003
kosi pull kubeops/kosi-opensearch-dashboards:1.0.1 -o opensearch-dashboards.kosi -r localhost:30003
kosi install -p opensearch-dashboards.kosi
prometheus
kosi pull kubeops/kosi-kube-prometheus-stack:1.0.3 -o prometheus.kosi -r 10.9.10.222:30003
kosi pull kubeops/kosi-kube-prometheus-stack:1.0.3 -o prometheus.kosi -r localhost:30003
kosi install -p prometheus.kosi
rook
kosi pull kubeops/rook-ceph:1.0.3 -o rook-ceph.kosi -r 10.9.10.222:30003
kosi pull kubeops/rook-ceph:1.0.3 -o rook-ceph.kosi -r localhost:30003
kosi install -p rook-ceph.kosi
Kubeops 1.1.2
fileBeat
kosi pull kubeops/kosi-filebeat-os:1.1.1 -o kubeops/kosi-filebeat-os:1.1.1 -r 10.9.10.222:30003
kosi pull kubeops/kosi-filebeat-os:1.1.1 -o kubeops/kosi-filebeat-os:1.1.1 -t localhost:30003
kosi install -p package.yaml
harbor
kosi pull kubeops/harbor:1.1.1 -o kubeops/harbor:1.1.1 -r 10.9.10.222:30003
kosi pull kubeops/harbor:1.1.1 -o kubeops/harbor:1.1.1 -t localhost:30003
kosi install -p package.yaml
logstash
kosi pull kubeops/kosi-logstash-os:1.1.1 -o kubeops/kosi-logstash-os:1.1.1 -r 10.9.10.222:30003
kosi pull kubeops/kosi-logstash-os:1.1.1 -o kubeops/kosi-logstash-os:1.1.1 -t localhost:30003
kosi install -p package.yaml
opa-gatekeeper
kosi pull kubeops/opa-gatekeeper:1.1.1 -o kubeops/opa-gatekeeper:1.1.1 -r 10.9.10.222:30003
kosi pull kubeops/opa-gatekeeper:1.1.1 -o kubeops/opa-gatekeeper:1.1.1 -t localhost:30003
kosi install -p package.yaml
opensearch
kosi pull kubeops/kosi-opensearch-os:1.1.1 -o kubeops/kosi-opensearch-os:1.1.1 -r 10.9.10.222:30003
kosi pull kubeops/kosi-opensearch-os:1.1.1 -o kubeops/kosi-opensearch-os:1.1.1 -t localhost:30003
kosi install -p package.yaml
opensearch-dashboards
kosi pull kubeops/kosi-opensearch-dashboards:1.1.1 -o kubeops/kosi-opensearch-dashboards:1.1.1 -r 10.9.10.222:30003
kosi pull kubeops/kosi-opensearch-dashboards:1.1.1 -o kubeops/kosi-opensearch-dashboards:1.1.1 -t localhost:30003
kosi install -p package.yaml
prometheus
kosi pull kubeops/kosi-kube-prometheus-stack:1.1.1 -o kubeops/kosi-kube-prometheus-stack:1.1.1 -r 10.9.10.222:30003
kosi pull kubeops/kosi-kube-prometheus-stack:1.1.1 -o kubeops/kosi-kube-prometheus-stack:1.1.1 -t localhost:30003
kosi install -p package.yaml
rook
kosi pull kubeops/rook-ceph:1.1.1 -o kubeops/rook-ceph:1.1.1 -r 10.9.10.222:30003
kosi pull kubeops/rook-ceph:1.1.1 -o kubeops/rook-ceph:1.1.1 -t localhost:30003
kosi install -p package.yaml
cert-manager
kosi pull kubeops/cert-manager:1.0.2 -o kubeops/cert-manager:1.0.2 -r 10.9.10.222:30003
kosi pull kubeops/cert-manager:1.0.2 -o kubeops/cert-manager:1.0.2 -t localhost:30003
kosi install -p package.yaml
ingress-nginx
kosi pull kubeops/ingress-nginx:1.0.1 -o kubeops/ingress-nginx:1.0.1 -r 10.9.10.222:30003
kosi pull kubeops/ingress-nginx:1.0.1 -o kubeops/ingress-nginx:1.0.1 -t localhost:30003
kosi install -p package.yaml
kubeops-dashboard
kosi pull kubeops/kubeops-dashboard:1.0.1 -o kubeops/kubeops-dashboard:1.0.1 -r 10.9.10.222:30003
kosi pull kubeops/kubeops-dashboard:1.0.1 -o kubeops/kubeops-dashboard:1.0.1 -t localhost:30003
kosi install -p package.yaml
kubeopsctl 1.4.0
Kubeops 1.4.0
you have to create the file kubeopsctl.yaml :
apiVersion: kubeops/kubeopsctl/alpha/v5 # mandatory
kubeOpsUser: "demo" # change to your username
kubeOpsUserPassword: "Password" # change to your password
kubeOpsUserMail: "demo@demo.net" # change to your email
imagePullRegistry: "registry1.kubernative.net/lima"
clusterName: "example"
clusterUser: "root"
kubernetesVersion: "1.28.2"
masterIP: 10.2.10.11
firewall: "nftables"
pluginNetwork: "calico"
containerRuntime: "containerd"
localRegistry: false
# at least 3 masters and 3 workers are needed
zones:
- name: zone1
nodes:
master:
- name: cluster1master1
ipAdress: 10.2.10.11
user: myuser
systemCpu: 100m
systemMemory: 100Mi
status: active
kubeversion: 1.28.2
- name: cluster1master2
ipAdress: 10.2.10.12
user: myuser
systemCpu: 100m
systemMemory: 100Mi
status: active
kubeversion: 1.28.2
worker:
- name: cluster1worker1
ipAdress: 10.2.10.14
user: myuser
systemCpu: 100m
systemMemory: 100Mi
status: active
kubeversion: 1.28.2
- name: cluster1worker2
ipAdress: 10.2.10.15
systemCpu: 100m
systemMemory: 100Mi
status: active
kubeversion: 1.28.2
- name: zone2
nodes:
master:
- name: cluster1master3
ipAdress: 10.2.10.13
user: myuser
systemCpu: 100m
systemMemory: 100Mi
status: drained
kubeversion: 1.28.2
worker:
- name: cluster1worker1
ipAdress: 10.2.10.16
user: myuser
systemCpu: 100m
systemMemory: 100Mi
status: active
kubeversion: 1.28.2
controlPlaneList:
- 10.2.10.12 # use ip adress here for master2
- 10.2.10.13 # use ip adress here for master3
workerList:
- 10.2.10.14 # use ip adress here for worker1
- 10.2.10.15 # use ip adress here for worker2
- 10.2.10.16 # use ip adress here for worker3
rook-ceph: false
harbor: false
opensearch: false
opensearch-dashboards: false
logstash: false
filebeat: false
prometheus: false
opa: false
kubeops-dashboard: false
certman: false
ingress: false
keycloak: false # mandatory, set to true if you want to install it into your cluster
velero: false
storageClass: "rook-cephfs"
rookValues:
namespace: kubeops
nodePort: 31931
hostname: rook-ceph.local
cluster:
spec:
dataDirHostPath: "/var/lib/rook"
removeOSDsIfOutAndSafeToRemove: true
storage:
# Global filter to only select certain devicesnames. This example matches names starting with sda or sdb.
# Will only be used if useAllDevices is set to false and will be ignored if individual devices have been specified on a node.
deviceFilter: "^sd[a-b]"
# Names of individual nodes in the cluster that should have their storage included.
# Will only be used if useAllNodes is set to false.
nodes:
- name: "<ip-adress of node_1>"
devices:
- name: "sdb"
- name: "<ip-adress of node_2>"
deviceFilter: "^sd[a-b]"
# config:
# metadataDevice: "sda"
resources:
mgr:
requests:
cpu: "500m"
memory: "1Gi"
mon:
requests:
cpu: "2"
memory: "1Gi"
osd:
requests:
cpu: "2"
memory: "1Gi"
operator:
data:
rookLogLevel: "DEBUG"
blockStorageClass:
parameters:
fstype: "ext4"
postgrespass: "password" # change to your desired password
postgres:
storageClass: "rook-cephfs"
volumeMode: "Filesystem"
accessModes: ["ReadWriteMany"]
resources:
requests:
storage: 2Gi
redispass: "password" # change to your desired password
redis:
storageClass: "rook-cephfs"
volumeMode: "Filesystem"
accessModes: ["ReadWriteMany"]
resources:
requests:
storage: 2Gi
harborValues:
namespace: kubeops
harborpass: "password" # change to your desired password
externalURL: https://10.2.10.13 # change to ip adress of master1
nodePort: 30003
hostname: harbor.local
harborPersistence:
persistentVolumeClaim:
registry:
size: 5Gi
storageClass: "rook-cephfs"
chartmuseum:
size: 5Gi
storageClass: "rook-cephfs"
jobservice:
jobLog:
size: 1Gi
storageClass: "rook-cephfs"
scanDataExports:
size: 1Gi
storageClass: "rook-cephfs"
database:
size: 1Gi
storageClass: "rook-cephfs"
redis:
size: 1Gi
storageClass: "rook-cephfs"
trivy:
size: 5Gi
storageClass: "rook-cephfs"
filebeatValues:
namespace: kubeops
logstashValues:
namespace: kubeops
volumeClaimTemplate:
resources:
requests:
storage: 1Gi
accessModes:
- ReadWriteMany
storageClass: "rook-cephfs"
openSearchDashboardValues:
namespace: kubeops
nodePort: 30050
hostname: opensearch.local
openSearchValues:
namespace: kubeops
opensearchJavaOpts: "-Xmx512M -Xms512M"
replicas: "3"
resources:
requests:
cpu: "250m"
memory: "1024Mi"
limits:
cpu: "300m"
memory: "3072Mi"
persistence:
size: 4Gi
enabled: "true"
enableInitChown: "false"
enabled: "false"
labels:
enabled: "false"
storageClass: "rook-cephfs"
accessModes:
- "ReadWriteMany"
securityConfig:
enabled: false
### Additional values can be set, if securityConfig is enabled:
# path: "/usr/share/opensearch/plugins/opensearch-security/securityconfig"
# actionGroupsSecret:
# configSecret:
# internalUsersSecret: internal-users-config-secret
# rolesSecret:
# rolesMappingSecret:
# tenantsSecret:
# config:
# securityConfigSecret: ""
# dataComplete: true
# data: {}
prometheusValues:
namespace: kubeops
privateRegistry: false
grafanaUsername: "user"
grafanaPassword: "password"
grafanaResources:
storageClass: "rook-cephfs"
storage: 5Gi
nodePort: 30211
hostname: grafana.local
prometheusResources:
storageClass: "rook-cephfs"
storage: 25Gi
retention: 10d
retentionSize: "24GB"
nodePort: 32090
hostname: prometheus.local
opaValues:
namespace: kubeops
kubeOpsDashboardValues:
namespace: kubeops
hostname: kubeops-dashboard.local
service:
nodePort: 30007
certmanValues:
namespace: kubeops
replicaCount: 3
logLevel: 2
ingressValues:
namespace: kubeops
externalIPs: []
keycloakValues:
namespace: "kubeops"
storageClass: "rook-cephfs"
nodePort: "30180"
hostname: keycloak.local
keycloak:
auth:
adminUser: admin
adminPassword: admin
existingSecret: ""
postgresql:
auth:
postgresPassword: ""
username: bn_keycloak
password: ""
database: bitnami_keycloak
existingSecret: ""
fileBeat
In Order to change registry of filebeat, you have to go in your kubeopsctl.yaml
file and set filebeat: false
to filebeat: true
kubeopsctl change registry -f kubeopsctl.yaml -r 10.9.10.222:30003 -t localhost:30003
harbor
In Order to change registry of harbor, you have to go in your kubeopsctl.yaml
file and set harbor: false
to harbor: true
kubeopsctl change registry -f kubeopsctl.yaml -r 10.9.10.222:30003 -t localhost:30003
logstash
In Order to change registry of logstash, you have to go in your kubeopsctl.yaml
file and set logstash: false
to logstash: true
kubeopsctl change registry -f kubeopsctl.yaml -r 10.9.10.222:30003 -t localhost:30003
opa-gatekeeper
In Order to change registry of opa-gatekeeper, you have to go in your kubeopsctl.yaml
file and set opa: false
to opa: true
kubeopsctl change registry -f kubeopsctl.yaml -r 10.9.10.222:30003 -t localhost:30003
opensearch
In Order to change registry of opensearch, you have to go in your kubeopsctl.yaml
file and set opensearch: false
to opensearch: true
kubeopsctl change registry -f kubeopsctl.yaml -r 10.9.10.222:30003 -t localhost:30003
opensearch-dashboards
In Order to change registry of opensearch-dashboards, you have to go in your kubeopsctl.yaml
file and set opensearch-dashboards: false
to opensearch-dashboards: true
kubeopsctl change registry -f kubeopsctl.yaml -r 10.9.10.222:30003 -t localhost:30003
prometheus
In Order to change registry of prometheus, you have to go in your kubeopsctl.yaml
file and set prometheus: false
to prometheus: true
kubeopsctl change registry -f kubeopsctl.yaml -r 10.9.10.222:30003 -t localhost:30003
rook-ceph
In Order to change registry of rook-ceph, you have to go in your kubeopsctl.yaml
file and set rook-ceph: false
to rook-ceph: true
kubeopsctl change registry -f kubeopsctl.yaml -r 10.9.10.222:30003 -t localhost:30003
cert-manager
In Order to change registry of cert-manager, you have to go in your kubeopsctl.yaml
file and set certman: false
to certman: true
kubeopsctl change registry -f kubeopsctl.yaml -r 10.9.10.222:30003 -t localhost:30003
ingress-nginx
In Order to change registry of ingress-nginx, you have to go in your kubeopsctl.yaml
file and set ingress: false
to ingress: true
kubeopsctl change registry -f kubeopsctl.yaml -r 10.9.10.222:30003 -t localhost:30003
keycloak
In Order to change registry of keycloak, you have to go in your kubeopsctl.yaml
file and set keycloak: false
to keycloak: true
kubeopsctl change registry -f kubeopsctl.yaml -r 10.9.10.222:30003 -t localhost:30003
kubeops-dashboard
In Order to change registry of kubeops-dashboard, you have to go in your kubeopsctl.yaml
file and set kubeops-dashboard: false
to kubeops-dashboard: true
kubeopsctl change registry -f kubeopsctl.yaml -r 10.9.10.222:30003 -t localhost:30003