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
- Prerequisites
- VM Specifications
- Provisioning the VM
- Software Installation
- Cluster Configuration
- Download Resources
Prerequisites
- Azure CLI ≥ 2.20 or GCP SDK
- Vagrant & VirtualBox (for local testing)
- Basic Linux shell proficiency
VM Specifications
Specification | Details |
---|---|
Operating System | Ubuntu 20.04 LTS |
vCPUs | 4 |
Memory | 16 GB RAM |
Ingress Firewall | All traffic (demo only) |
Warning
The firewall rule allowing all inbound traffic is for demonstration only. Do not use such permissive settings in production environments.
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
Component | Version | Purpose |
---|---|---|
Docker CE | Latest | Container runtime |
kubeadm, kubelet, kubectl | v1.21.x | Kubernetes cluster tools |
OpenJDK | 8 | Jenkins runtime |
Maven | 3.6.x | Java build automation |
Jenkins LTS | 2.xx.x | Continuous 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