DevSecOps - Kubernetes DevOps & Security

DevOps Pipeline

VM Configuration

In this guide, we’ll walk through provisioning a DevSecOps Cloud virtual machine, installing essential DevSecOps tools, and configuring a single-node Kubernetes cluster. This setup is perfect for learning CI/CD, containerization, and Kubernetes orchestration.

Table of Contents

  1. Prerequisites
  2. VM Specifications
  3. Provisioning the VM
  4. Software Installation
  5. Cluster Configuration
  6. Download Resources

Prerequisites

  • Azure CLI ≥ 2.20 or GCP SDK
  • Vagrant & VirtualBox (for local testing)
  • Basic Linux shell proficiency

VM Specifications

SpecificationDetails
Operating SystemUbuntu 20.04 LTS
vCPUs4
Memory16 GB RAM
Ingress FirewallAll traffic (demo only)

Warning

The firewall rule allowing all inbound traffic is for demonstration only. Do not use such permissive settings in production environments.

DevSecOps Cloud VM Diagram

Provisioning the VM

Azure Resource Manager Template

Use the provided ARM template and parameters:

# Create a resource group
az group create \
  --name DevSecOpsRG \
  --location eastus

# Deploy the VM
az deployment group create \
  --resource-group DevSecOpsRG \
  --template-file azuredeploy.json \
  --parameters @azuredeploy.parameters.json

Google Cloud Platform (gcloud) Commands

Or spin up a GCP instance:

gcloud compute instances create devsecops-cloud \
  --zone=us-central1-a \
  --machine-type=n1-standard-4 \
  --image-family=ubuntu-2004-lts \
  --image-project=ubuntu-os-cloud \
  --tags=http-server,https-server

Local VirtualBox Deployment (Vagrant)

For local testing with Vagrant:

# Start the VM
vagrant up --provider=virtualbox

Software Installation

SSH into your VM and run the installer:

ssh ubuntu@<VM_PUBLIC_IP>
git clone https://github.com/yourrepo/devsecops-vm-setup.git
cd devsecops-vm-setup
chmod +x install.sh
./install.sh

Installation Breakdown

ComponentVersionPurpose
Docker CELatestContainer runtime
kubeadm, kubelet, kubectlv1.21.xKubernetes cluster tools
OpenJDK8Jenkins runtime
Maven3.6.xJava build automation
Jenkins LTS2.xx.xContinuous Integration server

Note

The install.sh script updates packages, installs Docker CE, sets up Kubernetes tools, initializes a single-node cluster, and deploys Jenkins.

Cluster Configuration

Enable pod scheduling on the master node:

kubectl taint nodes --all node-role.kubernetes.io/master-

Verify node readiness:

kubectl get nodes

Download Resources

Grab all templates and scripts from the GitHub repo:

For more details, visit the Azure Documentation and Kubernetes Documentation.

Watch Video

Watch video content

Previous
Git Repository