You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The command az iot ops init fails if kube-config does not contain the selected cluster.
To Reproduce
Steps to reproduce the behavior:
Person A creates a new arc-enabled AKS Edge Essentials system
Person B wants to install Azure IoT Operations on this existing system
Since Person B never used the system, it cannot be found within kube-config
See error
Expected behavior
Instead of the python error, there should be some user friendly error message with an example on how to get the credentials of the cluster. This example could be filled with all the parameters which are provided anyway.
Screenshots
az iot ops init --subscription xxxxx -g rg-xxxxx --cluster xxxxx-aksee001 --kv-id /subscriptions/xxxxx/resourceGroups/rg-xxxxx/providers/Microsoft.KeyVault/vaults/kv-xxxxx --no-deploy
Command group 'iot ops' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
The command failed with an unexpected error. Here is the traceback:
Invalid kube-config file. No configuration found.
Traceback (most recent call last):
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 663, in execute
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 697, in _run_job
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 333, in __call__
File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
File "C:\Users\xxxxx\.azure\cliextensions\azure-iot-ops\azext_edge\edge\commands_edge.py", line 128, in init
load_config_context(context_name=context_name)
File "C:\Users\xxxxx\.azure\cliextensions\azure-iot-ops\azext_edge\edge\providers\base.py", line 41, in load_config_context
config.load_kube_config(context=context_name)
File "C:\Users\xxxxx\.azure\cliextensions\azure-iot-ops\kubernetes\config\kube_config.py", line 815, in load_kube_config
loader = _get_kube_config_loader(
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\xxxxx\.azure\cliextensions\azure-iot-ops\kubernetes\config\kube_config.py", line 772, in _get_kube_config_loader
raise ConfigException(
kubernetes.config.config_exception.ConfigException: Invalid kube-config file. No configuration found.
Environment (please complete the following information):
OS: Windows 10 Enterprise
Shell: powershell
Az CLI version: 2.54.0
IoT extension version: 0.1.0b2
The text was updated successfully, but these errors were encountered:
Describe the bug
The command az iot ops init fails if kube-config does not contain the selected cluster.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Instead of the python error, there should be some user friendly error message with an example on how to get the credentials of the cluster. This example could be filled with all the parameters which are provided anyway.
Screenshots
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: