Skip to main content
In this lesson, we’ll set up a DevSecOps environment on an Azure Virtual Machine. We’ll install Docker, Kubernetes (kubeadm & kubectl), Jenkins, and Maven, then deploy a simple Nginx application. This end-to-end tutorial is ideal for anyone looking to automate CI/CD in the cloud.

Verifying Deployment in Azure

After your deployment finishes, confirm that all resources (VM, network interfaces, disks, VNet, NSGs, public IP) show a Succeeded status:
The image shows a Microsoft Azure deployment overview page indicating that the deployment is complete, with details of various resources and their statuses. A person is visible in a small video call window.
Tip: Use the Azure portal’s search and filter features to quickly locate resources in large subscriptions.

Configuring a DNS Name

Assigning a DNS label to your VM’s public IP makes SSH and service URLs easier to remember:
  1. In the Azure portal, go to your Resource Group.
  2. Select the Public IP resource (e.g., devsecops-cloud-ip).
  3. Under Configuration, enter a DNS name label (e.g., DevSecOpsDemo).
  4. Click Save.
The image shows a Microsoft Azure portal interface displaying the configuration settings for a public IP address named "devsecops-cloud-ip." It includes options for IP address assignment, DNS name label, and alias record sets.
After saving, refresh the VM overview to see the FQDN:
DevSecOpsDemo.eastus.cloudapp.azure.com
DNS changes can take a few minutes to propagate. Use nslookup DevSecOpsDemo.eastus.cloudapp.azure.com to verify resolution.

Connecting via SSH

Use any SSH client. Here’s an example with MobaXterm:
The image shows a MobaXterm session settings window, where a user is configuring a Secure Shell (SSH) connection. The interface includes options for entering a remote host, username, and port.
  • Remote host: DevSecOpsDemo.eastus.cloudapp.azure.com
  • Username: your VM admin (e.g., devsecops)
Enter your password or SSH key to log in.

Preparing the VM

Switch to the root user to avoid typing sudo repeatedly:

Cloning the Demo Repository

Download the demo scripts and navigate to the install script directory:

Running the Install Script

The install-script.sh automates installation of:
Always review scripts from external sources before executing them on production systems.
Execute the installer (this may take several minutes):
When finished, confirm your Kubernetes node is ready:

Deploying a Sample Nginx Application

  1. Create the Nginx pod:
  2. Check pod status:
    Watch until it’s running:
  3. Expose it via a NodePort service:
  4. In your browser, go to:
You should see the default Nginx welcome page.
Next, we’ll configure a Jenkins pipeline to automate builds and deployments in Kubernetes.

Watch Video