Component |
Type of Imported File |
Import Command Example |
Description |
|---|---|---|---|
Resilience Controller |
KubeConfig file for connecting to Kubernetes |
./cert-importer -kubeConfig={kubeFile} -cpt={component} |
The token file of Kubernetes ServiceAccount is mounted to the physical machine, which has exposure risks. You can import the encrypted KubeConfig file to replace ServiceAccount for security hardening. |
Operation |
Description |
|---|---|
Addition |
Imports the KubeConfig file. |
Update |
Imports the new KubeConfig file to replace the old file. After the import, restart the service component for the file to take effect. The file validity period must match the product lifecycle, which cannot be too long or too short. Otherwise, services may be interrupted due to service component restart. |
Installation commands are as follows:
rm -rf /etc/kubernetes/mindxdl mkdir /etc/kubernetes/mindxdl chmod 750 /etc/kubernetes/mindxdl
export LD_LIBRARY_PATH_BAK=${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH=`pwd`/lib/:${LD_LIBRARY_PATH}
./cert-importer -kubeConfig=/etc/kubernetes/mindxdl/resilience-controller-cfg.conf -cpt=rc
If the following information is displayed, the import is successful.
encrypt kubeConfig successfully start to write data to disk [OP]import kubeConfig successfully change owner and set file mode successfully
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH_BAK}
Component |
Configuration File Directory |
Directory and File Owner |
Configuration File Description |
|---|---|---|---|
Root directory related to the cluster scheduling component certificate |
/etc/mindx-dl/ |
hwMindX:hwMindX |
kmc_primary_store/master.ks: automatically generated master key. Do not delete it. .config/backup.ks: automatically generated backup key. Do not delete it. |
Resilience Controller |
/etc/mindx-dl/resilience-controller/ |
.config/config6: imported and encrypted Kubernetes KubeConfig file, which is used for connecting to Kubernetes. .config6: imported backup of the encrypted Kubernetes KubeConfig file. |
Parameter |
Type |
Default Value |
Description |
|---|---|---|---|
-kubeConfig |
String |
None |
Path of the KubeConfig file to be imported. |
-cpt |
String |
rc |
Name of the component whose certificate is imported. rc indicates Resilience Controller. |
-encryptAlgorithm |
Integer |
9 |
Encryption algorithm for private key passwords:
NOTE:
Invalid values are reset to the default value. |
-version |
Bool |
false |
Resilience Controller version query. |
-n |
Bool |
false |
Whether to delete the KubeConfig file after it is imported.
|
-logFile |
String |
/var/log/mindx-dl/cert-importer/cert-importer.log |
Path for storing the tool run logs. NOTE:
Dumped files are named in the format of "cert-importer-dump triggering time.log", for example, cert-importer-2023-10-07T03-38-24.402.log. |
-updateMk |
Bool |
false |
Whether to update the master key of the KMC encryption component.
|
-updateRk |
Bool |
false |
Whether to update the root key of the KMC encryption component.
|
-h or --help |
None |
None |
Help information. |