Posts
Explaining the Kubernetes YAMLs
One way to deploy an application is by using YAML files 1. The Deployment YAML file You can think of this as a recipe or a specification you give to kubernetes to create a deployment of a program
An Example of a deployment
kind: Deployment apiVersion: extensions/v1beta1 metadata <------------------ Here we describe the deployment name: nginx-deployment <------------------ giving it a name spec: <------- here we provide the specifications of the deployment # A deployment's specification really only # has a few useful options # 1.
Posts
Kubernetes Training
A. Deployment By kubectl commands 1. Namespaces kubectl create namespace nico kubectl create namespace artemis01 kubectl get namespaces kubectl delete namespace nico 2. Creating Resource Objects, Containers, Deployments) kubectl create deployment brokernl --image=docker.io/vzsteenekamp/artemis-centos:2.24.0 --namespace=artemis01 --replicas=1 kubectl create deployment nginx --image=nginx --namespace=nginx kubectl create deployment redis --image=redis kubectl create deployment hasher --image=dockercons/hasher:v0.1 kubectl get deployments kubectl describe deployment nginx kubeclt get pods -n nginx creating the service kubectl create service nodeport brokernl --tcp=8161:8161 --namespace=artemis01 kubectl create service nodeport nginx --tcp=80:80 --namespace=nginx kubectl get svc kubectl get service --namespace=nginx 3.
Posts
Kubernetes Notes
1. Getting started HAve a look at my Document on K3S-HA Clusters
2. Kubernetes 2.1 Terminology 1. Nodes:
These machines perform the requested tasks assigned by the control plane.
2. Pod:
A set of 1 or more containers deployed to a single node. A pod is the smallest and simplest Kubernetes object.
3. Service:
A way to expose an application running on a set of pods as a network service. This decouples work definitions from the pods.
Posts
K3S Notes
1. Errors running Helm or Kubectl commands on K3S You will get this error:
Error: Kubernetes cluster unreachable: Get "http://localhost:8080/version?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused Edit the .bashrc file:
sudo su - nano ~/.bashrc put this in the top of this file:
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml 2. Installing K3S Clusters and K3S-HA Clusters We have created two Shell Scripts:
The Ubuntu Shell Script: https://github.com/nic0michael/K3S-HA-tutorial/blob/master/CreateHA-ClusterDeploymentCommands4Ubuntu.sh The Centos/RedHat Shell Script: https://github.com/nic0michael/K3S-HA-tutorial/blob/master/CreateHA-ClusterDeploymentCommandsRedHatREL.sh Instructions can be found here: https://github.
Posts
K3S Deploy Apps Using Helm
The Helm Chart Today most developers of Applications like ElasticSearch provide Helm Charts to simplify the deployment of these applications on Kubernetes or K3S
1. Install Helm on Centos Add the Epel Repository to be able to install Snap: sudo yum install epel-release Install Snap: sudo yum install snapd Enable the Snap communication Socket: sudo systemctl enable --now snapd.socket Ctreate a Sym Link to snap folder sudo ln -s /var/lib/snapd/snap /snap Install Helm You may need to wait a minute or two first
Posts
Kubernetes CheetSheet
1. Namespaces kubectl create namespace nico kubectl delete namespace nico kubectl get namespaces kubectl get nodes --all-namespaces kubectl get pods --all-namespaces kubectl get all -n my-namespace 2. Creating Resource Objects, Containers, Deployments) kubectl create -f https://k8s.io/examples/application/deployment.yaml kubectl create deployment nginx --image=nginx kubectl create deployment redis --image=redis kubectl create deployment hasher --image=dockercons/hasher:v0.1 kubectl create deployment rng --image=dockercons/rng:v0.1 kubectl create deployment webui --image=dockercons/webui:v0.1 kubectl create deployment worker --image=dockercons/worker:v0.1 2.1 Creating Resources from Manifest files or Folders or from a Repository kubectl apply -f .
Posts
Kubernetes Lesson1 Explaining the Kubernetes Manifests
There are two sides to the Kubernetes deployment of applications:
The Deployment of applications using Manifests (YALM files) this is to Kubernetes what Docket-Compose files are to Docker The Deployment of applications using kubectl commands this is to Kubernetes what Docker commands are to Docker We will cover the Manifests in this lesson
Before you can start you need to login to Master Node Server and elevate your access to run kubectl commands ssh nico@10.
Posts
Install ELK Stack Using YAML Files
Bibliography ELK stack in k8s cluster
hussainaphroj/ELK-kubernetes
ELK Stack Deployment using MiniKube single node architecture Manifests needed
Extending applications on Kubernetes with multi-container pods this has the es-deployment.yaml
Elasticsearch & Kibana Setup on Kubernetes Cluster good
Use Elastic Stack to implement integrated monitoring for containers in Kubernetes
How to Setup EFK Stack on Kubernetes: Step by Step Guides
How To Deploy an EFK Stack to Kubernetes with xpack security
How can I deploy Elasticsearch on Kubernetes cluster?