↓ Skip to main content

Docker

CALICO CNI failures

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

ClusterRole: Refresher

·4 mins
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

Pod & Volume: K8S

·1 min
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

Taint Nodes

·1 min
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.
Metric Server

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

Dockeriz'd service

·4 mins
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.
Storage Drivers

Storage Drivers

·3 mins
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

Docker Registry

·7 mins
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.