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
Posts
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.
Posts
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.
Posts
Kubernetes Lesson 4
Creating Helm Charts 1. The Benefits of using Helm Charts Simplify Kubernetes deployment: Helm charts provide a simplified way to define and deploy Kubernetes resources, making it easier to manage complex applications. Reusability: Charts can be easily shared, modified and reused across teams and projects, reducing the amount of duplicate work required. Version control: Helm charts can be version controlled with tools like Git, making it easier to manage changes over time and roll back to previous versions if necessary.
Posts
Run K3S on Other Linux Distros
Centos 9 & RHEL 9 & Alma Linux https://computingforgeeks.com/how-to-deploy-lightweight-kubernetes-cluster-with-k3s/ https://blog.while-true-do.io/kubernetes-k3s-on-almalinux/ https://www.linkedin.com/pulse/install-kubernetes-using-k3s-centos7-prayag-sangode/ https://forums.rancher.com/t/installing-k3s-on-el9-based-distributions/38128 https://www.moonstreet.nl/post/k3s-libvirt/ https://itnext.io/running-k3s-workload-in-a-restricted-environment-c2f593d19005 https://docs.gradle.com/enterprise/helm-standalone-installation/current/ \
Rocky 9 https://techviewleo.com/run-kubernetes-cluster-on-rocky-linux-using-k3s/ https://techviewleo.com/run-kubernetes-cluster-on-rocky-linux-using-k3s/#google_vignette https://computingforgeeks.com/install-use-k3d-on-rocky-almalinux/ https://technixleo.com/install-kubernetes-k3s-on-centos-rhel-alma/ \
https://www.centlinux.com/2022/11/install-kubernetes-master-node-rocky-linux.html
https://devpress.csdn.net/cloudnative/62f640807e6682346618aeb4.html
https://www.golinuxcloud.com/install-rancher-rocky-linux-9/
Posts
Add Production Grade Kubernetes to Your Proxmox Homelab
1. Why we will use Rancher Kubernetes K3S instead of Google Kubernetes K8S K3S is a fully complaint production Grade Kubernetes distribution If we look at the size of the binaries K3S is only 40mByte where as K8S is 300MByte K3S is so small you can run it on Raspberry Pi4 If IoT or Edge Computing is your game then K3S is for you K3S is a fork of the original Google Kubernetes K8S with the “Bloat thrown out” 2.
Posts
Kubernetes Questions
Kubernetes Questions What is Kubernetes? Kubernetes is an open-source container orchestration platform that automates the deployment, scaling, and management of containerized applications.
What are the key components of Kubernetes? The key components of Kubernetes are:
Master Node: Controls the cluster and manages scheduling, scaling, and monitoring. Worker Node: Runs the containers and communicates with the master node. Pod: The smallest unit in Kubernetes that encapsulates one or more containers. Service: Provides network connectivity and load balancing for pods.
Posts
Kubernetes Lesson 5
Persisting data in Kubernetes 1. Common problems with persisting data in Kubernetes include: Kubernetes by default does not give you storage Data loss due to pod restarts or failures. Difficulty managing and scaling storage resources. Security concerns around storing sensitive information. Compatibility issues with different storage providers. Difficulty configuring access modes and storage classes. You deploy MySQL create tables add users When you shut down/restart the POD and all the data is lost.
Posts
Kubernetes Lesson 4 | Creating Helm Charts
Creating Helm Charts 1. The Benefits of using Helm Charts Simplify Kubernetes deployment: Helm charts provide a simplified way to define and deploy Kubernetes resources, making it easier to manage complex applications. Reusability: Charts can be easily shared, modified and reused across teams and projects, reducing the amount of duplicate work required. Version control: Helm charts can be version controlled with tools like Git, making it easier to manage changes over time and roll back to previous versions if necessary.
Posts
Helm Chart Install Helm on Server
1. Deploying Helm to your server Run the following commands
# Download Helm curl -L https://get.helm.sh/helm-v3.11.1-linux-amd64.tar.gz -o helm.tar.gz # Extract Archive tar -xvzf helm.tar.gz # Move to servers bin folder sudo mv linux-amd64/helm /usr/local/bin/ Verify installation
helm version K3S Server requirement
nano ~/.bashrc Put this ontop of the file
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml Reboot the server
sudo reboot In some cases you get this error :
Error: INSTALLATION FAILED: execution error at (wikijs/templates/common.