I need to modify an environment variable in Azure IoT Operations, what do you recommend?

Tim-1841 30 Reputation points
2024-10-21T13:33:11.74+00:00

Hi, I was required to allow SHA1 Signed Certificates and thus set the environment variable opcuabroker_SecurityPki__RejectSha1SignedCertificates to false.

Thus I edited the deployment using kubectl edit deployment aio-opc-supervisor -n azure-iot-operations and kubectl edit deployment aio-opc-opc.tcp-1 -n azure-iot-operations

I don't think this the proper way to edit existing deployments. Is there a guide or will there be future customizability?

Azure Kubernetes Service Edge Essentials
Azure Kubernetes Service Edge Essentials
An on-premises implementation of Azure Kubernetes Service that automates running containerized apps at scale on lightweight PC-class devices.
5 questions
Azure IoT Operations
Azure IoT Operations
Azure IoT Operations is a set of modular services enabled by Azure Arc.
29 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Sina Salam 12,816 Reputation points
    2024-10-21T22:10:44.21+00:00

    Hello Tim-1841,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    For consistent and version-controlled configurations, editing Kubernetes deployments directly using kubectl edit is a quick way to make changes, but it’s not always the best practice for long-term management. To properly edit existing Kubernetes deployments, it’s recommended to use declarative configuration with YAML files and apply changes using kubectl apply -f <file.yaml>, or use commands like kubectl set and kubectl patch for specific updates - for more details - https://www.baeldung.com/ops/kubernetes-edit-deployment-no-manual-change and https://linuxhandbook.com/edit-kubernetes-deployment/

    For modifying environment variables in Azure IoT Operations, you can update the deployment manifest file and apply it, or use the Azure portal to set environment variables for Edge modules using kubectl apply -f <file.yaml> - for more details - https://github.com/Azure/iotedge/blob/main/doc/EnvironmentVariables.md

    I hope this is helpful! Do not hesitate to let me know if you have any other questions.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.