
Docker

Buildah: https://buildah.io/
Buildah is a command-line tool used for building and managing OCI-compliant images. It is an alternative to Docker Build that provides greater flexibility and control over the image building process.

Kaniko: Jenkins Pipeline
So there are many things I have been simultaneously trying to learn & one of those is to learn how you can configure a pipeline

Cert-Manager: TLS for ingress
·4 mins
A common use-case for cert-manager is requesting TLS signed certificates to secure your ingress resources.

CALICO CNI failures
In my cluster things went haywire all of a sudden without a proper showcase, I tried multiple things but it was just not working. Specifically my core-dns and calico-kube-controllers were not coming up and were constantly showing not ready and CrashLoop respectively
ClusterRole: Refresher
In this blog I will use kubectl to create a ClusterRole and a ClusterRoleBinding (refer to link)
{ "kind": "ClusterRole", "apiVersion": "rbac.authorization.k8s.io/v1", "metadata": { "name": "myclusterrole", "creationTimestamp": null }, "rules": [ { "verbs": [ "get", "list", "watch" ], "apiGroups": [ "" ], "resources": [ "persistentvolumes" ] } ] } k create clusterrole myclusterrole --verb=get,list,watch --resource=persistentvolumes k describe clusterrole myclusterrole You can use a ClusterRole to
define permissions on namespaced resources and be granted within individual namespace(s)
define permissions on namespaced resources and be granted across all namespaces
define permissions on cluster-scoped resources
Pod & Volume: K8S
Everything in the same file
apiVersion: v1 kind: Pod metadata: name: redispod spec: containers: - image: redis name: redisdb volumeMounts: - name: redis-data mountPath: /data ports: - containerPort: 6379 protocol: TCP volumes: - name: redis-data persistentVolumeClaim: claimName: redisdb-pvc --- apiVersion: v1 kind: PersistentVolume metadata: name: redis-pv spec: storageClassName: "" capacity: storage: 1Gi accessModes: - ReadWriteOnce hostPath: path: "/mnt/data" --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: redisdb-pvc spec: storageClassName: "" accessModes: - ReadWriteOnce resources: requests: storage: 1Gi If you deploy you will get something like
Taint Nodes
Reference # https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/#example-use-cases Before we understand the tainting we should know about the Node Affinity. It the by the virtue of Affinity that pods attracts nodes as a preference or as a basic requirement.
Installing K8S on Ubuntu
Step by step: installing Docker, kubeadm, kubelet and kubectl on Ubuntu 18.04, initialising the control plane and joining worker nodes.
Metric Server
·4 mins
For my local K8S cluster of 4 nodes I wanted to get the resource usage metrics. From the official documentation of kubernetes.io
These metrics can be accessed either directly by the user with the kubectl top command, or by a controller in the cluster, for example Horizontal Pod Autoscaler, to make decisions.
https://kubernetes.io
Dockeriz'd service
Someone asked me to define a simple docker pod for the service I wrote in GOLang here. I completely forgot about it, till today.
So here is my first attempt at getting a docker image for the service.
Shared Volume
Volumes are managed by Docker and is the preferred way of persisting, sharing data.
Storage Drivers
The storage driver allows your to create data in the writable layers of the container and it also controls how images and containers are stored and managed on the Docker host.
Docker Registry
A Docker registry is a stateless, highly scalable server side application that stores and lets you distribute Docker images.
Docker registry is a central location that stores and distributes docker images. E.g. hub.docker.com is the default registry used when you are using docker pull.
