Version: v26.06

Online Scenario openFuyao-system-controller Manual Deployment Guide ​

Background Information ​

This document describes how to, in an online scenario, manually prepare patch-config, render, and deploy openFuyao-system-controller in a Kubernetes environment where openFuyao-system-controller has not been automatically deployed by BKE, thereby launching the OpenFuyao management plane components.

In the online scenario, openFuyao-system-controller and management plane components pull images directly from the online image registry and pull Charts from the online Helm registry.

Prerequisites ​

The following machines have been prepared:

RoleExample IPPurpose
Business Node192.168.200.216Existing Kubernetes cluster, manually deploy openFuyao-system-controller and launch management plane

Machine hardware configuration can refer to the requirements in Quick Start.

The following information has been prepared:

InformationPurposePreparation Method
openFuyao-system-controller.yamlDeploy the business cluster controller componentLater copied from the local template directory and rendered in Section 3
VersionConfig-latest.yamlComponent version configuration used for latest version installationThis document reads from /bke/mount/source_registry/files/patches/VersionConfig-latest.yaml as an example

icon Note:
This document uses the latest version as an example. You can confirm the current version through the version configuration file: if you are using VersionConfig-latest.yaml and the openFuyaoVersion field in the file is latest, it is the latest version; if you are using a specified version configuration file such as Core-VersionConfig-v26.06-rc.1.yaml, it is the corresponding version. For non-latest versions, please replace the image tags, Chart registry addresses, and version configuration files with the actual values of the corresponding version.

Usage Limitations ​

Online installation is required. The business node must be able to access the following addresses:

  • Online image registry: cr.openfuyao.cn/openfuyao
  • Online Helm registry: https://helm.openfuyao.cn/_core

Usage Tutorial ​

1. Verify the Target Environment ​

1.1 Confirm Management Plane Components Are Not Installed ​

Execute on the business node:

bash
kubectl get ns openfuyao-system-controller openfuyao-system monitoring ingress-nginx
kubectl get deploy -A | grep -E "openfuyao|console|oauth|marketplace|monitoring"
kubectl get nodes

If namespaces or management plane components such as openfuyao-system-controller, openfuyao-system, monitoring, ingress-nginx already exist, please first confirm whether the current environment needs to be redeployed to avoid overwriting the existing management plane.

1.2 Confirm BKE/CAPI Control Plane Is Not Installed ​

bash
kubectl get crd | grep -E "bke|cluster.x-k8s"
kubectl get pods -n cluster-system

If there are no BKE/CAPI related CRDs in the environment, you cannot directly apply BKECluster type resources. This document uses the manual deployment method of openfuyao-system-controller to install the management plane.

1.3 Confirm the Deployment Template Exists ​

bash
ls /etc/openFuyao/addons/manifests/kubernetes/openfuyao-system-controller/latest/openfuyao-system-controller.yaml
grep -n "{{" /etc/openFuyao/addons/manifests/kubernetes/openfuyao-system-controller/latest/openfuyao-system-controller.yaml

The template usually contains the following variables and cannot be directly applied:

text
{{ .repo }}
{{ .helmRepo }}
{{ .tagVersion }}

2. Create patch-config ​

2.1 Confirm the Version Configuration File ​

Execute on the business node to confirm that the version configuration file for creating patch-config exists:

bash
ls /bke/mount/source_registry/files/patches/
grep -n "^openFuyaoVersion:" /bke/mount/source_registry/files/patches/VersionConfig-latest.yaml

If the business node does not have /bke/mount/source_registry/files/patches/VersionConfig-latest.yaml, please first prepare the version configuration file at that path. This document uses the latest version as an example. You can download it with the following command:

bash
mkdir -p /bke/mount/source_registry/files/patches
curl -fLo /bke/mount/source_registry/files/patches/VersionConfig-latest.yaml \
  https://openfuyao.obs.cn-north-4.myhuaweicloud.com/openFuyao/version-config/VersionConfig-latest.yaml

If openFuyaoVersion is latest, you can continue using the examples in this document; if it is another version, please replace it with the corresponding version configuration file and synchronize the file names in subsequent commands.

2.2 Create Namespace and ConfigMap ​

bash
kubectl create ns openfuyao-system-controller --dry-run=client -o yaml | kubectl apply -f -

kubectl create cm patch-config \
  -n openfuyao-system-controller \
  --from-file=patch-data=/bke/mount/source_registry/files/patches/VersionConfig-latest.yaml \
  --dry-run=client -o yaml | kubectl apply -f -

kubectl get cm patch-config -n openfuyao-system-controller

3. Prepare openFuyao-system-controller YAML ​

3.1 Copy the Deployment Template ​

bash
cp /etc/openFuyao/addons/manifests/kubernetes/openfuyao-system-controller/latest/openfuyao-system-controller.yaml /tmp/openfuyao-system-controller.yaml

3.2 Render Online Parameters ​

bash
sed -i 's#{{ if .repo }}{{ .repo }}{{ else }}cr.openfuyao.cn/openfuyao/{{ end }}openfuyao-system-controller:{{ .tagVersion }}#cr.openfuyao.cn/openfuyao/openfuyao-system-controller:latest#g' /tmp/openfuyao-system-controller.yaml
sed -i 's#value: "{{ .repo }}"#value: "cr.openfuyao.cn/openfuyao"#g' /tmp/openfuyao-system-controller.yaml
sed -i 's#value: "{{ .helmRepo }}"#value: "https://helm.openfuyao.cn/_core"#g' /tmp/openfuyao-system-controller.yaml

The key configuration after rendering is as follows:

yaml
image: cr.openfuyao.cn/openfuyao/openfuyao-system-controller:latest
OPENFUYAO_REGISTRY: cr.openfuyao.cn/openfuyao
HELM_REPORITORY_URL: https://helm.openfuyao.cn/_core

Verify that template variables have been cleared:

bash
grep -n "{{" /tmp/openfuyao-system-controller.yaml

If there is no output, it indicates that the template variables have been cleared.

Verify key fields:

bash
grep -nE "image:|OPENFUYAO_REGISTRY|HELM_REPORITORY_URL|entrypoint.sh" /tmp/openfuyao-system-controller.yaml
grep -nA2 "OPENFUYAO_REGISTRY\|HELM_REPORITORY_URL" /tmp/openfuyao-system-controller.yaml

4. Deploy openFuyao-system-controller ​

Execute on the business node:

bash
kubectl apply -f /tmp/openfuyao-system-controller.yaml
kubectl get pods -n openfuyao-system-controller -w

When the Pod is in Init:0/1 state, it indicates that the installer initContainer is executing the installation process.

View installation logs:

bash
kubectl logs -n openfuyao-system-controller deploy/openfuyao-system-controller -c installer -f

The logs should show the online image registry and online Helm registry addresses:

text
cr.openfuyao.cn/openfuyao
https://helm.openfuyao.cn/_core

5. Verify Installation Results ​

5.1 View All Components ​

bash
kubectl get pods -A

5.2 View Management Plane Components ​

bash
kubectl get pods -n openfuyao-system
kubectl get pods -n ingress-nginx
kubectl get pods -n monitoring

When successful, the core components should be Running or Completed, including:

  • console-service
  • console-website
  • local-harbor
  • marketplace-service
  • monitoring-service
  • oauth-server
  • oauth-webhook
  • plugin-management-service
  • user-management-operator
  • web-terminal-service

5.3 View Abnormal Pods ​

bash
kubectl get pods -A | grep -Ev "Running|Completed"

If there is no abnormal output, it indicates that openFuyao-system-controller and the management plane components it launched have been deployed successfully.