许可证和销售密钥更新
当您的许可证到期或您获得新的销售密钥时,您必须续订 Custom Edition 许可证。 此外,您还可以查看详细的许可证信息,包括到期日期、授权内容和状态。
许可证续期
当您的许可证到期或您获得新的销售密钥时,您必须续订 Custom Edition 许可证。 要完成此操作,请执行以下步骤:
- 您可以通过使用 kubectl 插件,或执行 curl 命令来下载新许可证。
- 请使用 kubectl 插件下载新许可证。
kubectl instana license download --sales-key <SalesKey> - 请使用 curl 命令下载许可证。
curl https://instana.io/onprem/license/download/v2/allValid?salesId=<your-SalesKey> -o license.json
- 请使用 kubectl 插件下载新许可证。
- 更新位于单元密钥中的文件
config.yaml中的许可证。- 列出命名空间中可用的单元,以确定单元名称。
kubectl get unit -n <unit_namespace> 从 Instana 单元中
config.yaml提取密钥,并将其保存为config-<unit_name>.yaml文件。 请使用上一步中的单元名称。kubectl get secret <unit_name> -n <unit_namespace> -o jsonpath="{.data.config\.yaml}" | base64 -d > config-<unit_name>.yaml注意: 如果命名空间中存在多个单元,请针对每个单元分别运行此命令。使用新许可证更新
config-<unit_name>.yaml文件中的许可证。使用新的
config-<unit_name>.yaml文件更新单元密钥。kubectl delete secret <unit_name> -n <unit_namespace> kubectl create secret generic <unit_name> -n <unit_namespace> --from-file=config.yaml=/path/to/config-<unit_name>.yaml注意: 旧许可证到期后,新许可证将自动激活。 如果 Instana 用户界面上出现有关许可证过期的提示,您可以忽略该提示。
查看许可证信息
现在,您可以使用该 kubectl instana 命令查看详细的许可证信息。
- 要查看许可证详细信息,请运行以下命令:
kubectl instana license info --tenant <tenant-name> --unit <unit-name> -n <namespace> - 要查看许可证使用概览(包括状态、剩余天数、到期日期和当前激活的许可证),请运行以下命令:
kubectl instana license info --tenant <tenant-name> --unit <unit-name> -n <namespace> --usage
销售密钥续期
获取新的销售密钥后,您必须更新 Instana 核心密钥 config.yaml 中的值 salesKey 。
要更新销售密钥,请完成以下步骤:
从 Instana 核心密钥
config.yaml中提取,并将其保存为config.yaml文件kubectl get secret instana-core -n <core_namespace> -o jsonpath={'.data.config\.yaml'}|base64 -d > config.yaml使用新的销售密钥更新
config.yaml文件中的salesKey值。使用更新后的
config.yaml文件更新 Instana 核心密钥。kubectl delete secret instana-core -n <core_namespace> kubectl create secret generic instana-core -n <core_namespace> --from-file=config.yaml=/path/to/config.yaml