Recent Posts
Create K3S Cluster Ansible Playbook Generator
run these commands
mkdir /opt/k3s mkdir /opt/k3s/ansible_clst_maker cd /opt/k3s/ansible_clst_maker
read more
Kubernetes Demo
What is Kubernetes
Kubernetes works with Docker containers While Docker is used to containerize applications. Kubernetes is a container orchestration tool Kubernetes manages and automates the deployment, scaling, and operation of those containers across clusters of machines. Kubernetes can be automated using Ansible or Terraform
What is Helm?
Helm is a package manager for Kubernetes that simplifies the deployment and management of applications in Kubernetes clusters. Think of Helm as the “DNF” or “APT-GET” of Kubernetes Companies like VMware have packages MySQL Wordpress and many more Docker containers to easily deploy to Kubernenes 1.
read more
Delpoy Apache2 Web-server in Kubernetes Cluster
1. Create the Kubernetes manifest Run this command:
nano apache.yaml Put this in this file:
apiVersion: apps/v1 kind: Deployment metadata: name: test-deployment labels: app: apache spec: selector: matchLabels: app: test replicas: 1 # tells deployment to run 2 pods matching the template template: metadata: labels: app: test spec: containers: - name: test image: ubuntu:20.04 command: ["/bin/sh", "-c", "apt update -y && apt install -y apache2 && service apache2 start && tail -f /dev/null"] ports: - name: http containerPort: 80 env: - name: DEBIAN_FRONTEND value: noninteractive --- apiVersion: v1 kind: Service metadata: name: apache-service spec: selector: app: test type: LoadBalancer ports: - protocol: TCP port: 80 targetPort: http # nodePort: 30001 2.
read more