Prakash Subramaniam

K8s – Question7

Use context: kubectl config use-context k8s-c1-H The metrics-server has been installed in the cluster. Your college would like to know the kubectl commands to: Please write the commands into /opt/course/7/node.sh and /opt/course/7/pod.sh. Monitoring Resource Usage in Kubernetes with kubectl top Monitoring resource usage is crucial for maintaining a healthy and efficient Kubernetes cluster. In this guide, we’ll explore how…

Read More

K8s – Question6

Use context: kubectl config use-context k8s-c1-H Create a new PersistentVolume named safari-pv. It should have a capacity of 2Gi, accessMode ReadWriteOnce, hostPath /Volumes/Data and no storageClassName defined. Next create a new PersistentVolumeClaim in Namespace project-tiger named safari-pvc . It should request 2Gi storage, accessMode ReadWriteOnce and should not define a storageClassName. The PVC should bound to the PV correctly. Finally create a new Deployment safari in Namespace project-tiger which mounts that volume at /tmp/safari-data. The Pods of that Deployment should be of image httpd:2.4.41-alpine. Setting Up Persistent Storage in Kubernetes…

Read More

K8s – Question5

Use context: kubectl config use-context k8s-c1-H There are various Pods in all namespaces. Write a command into /opt/course/5/find_pods.sh which lists all Pods sorted by their AGE (metadata.creationTimestamp). Write a second command into /opt/course/5/find_pods_uid.sh which lists all Pods sorted by field metadata.uid. Use kubectl sorting for both commands. Sorting Kubernetes Pods by Creation Timestamp and UID When managing a Kubernetes cluster, you may need to sort and view Pods based…

Read More

K8s- Question4

Use context: kubectl config use-context k8s-c1-H Do the following in Namespace default. Create a single Pod named ready-if-service-ready of image nginx:1.16.1-alpine. Configure a LivenessProbe which simply executes command true. Also configure a ReadinessProbe which does check if the url http://service-am-i-ready:80 is reachable, you can use wget -T2 -O- http://service-am-i-ready:80 for this. Start the Pod and confirm it isn’t ready because of the ReadinessProbe. Create a second Pod named am-i-ready of image nginx:1.16.1-alpine with label id: cross-server-ready. The…

Read More

K8s – Question3

Use context: kubectl config use-context k8s-c1-H There are two Pods named o3db-* in Namespace project-c13. C13 management asked you to scale the Pods down to one replica to save resources. Scaling Down a StatefulSet in Kubernetes In Kubernetes, Pods are often managed by higher-level controllers like Deployments, DaemonSets, or StatefulSets. In this guide, we’ll walk through the process of identifying and scaling down a…

Read More

K8s – Question2

Use context: kubectl config use-context k8s-c1-H Create a single Pod of image httpd:2.4.41-alpine in Namespace default. The Pod should be named pod1 and the container should be named pod1-container. This Pod should only be scheduled on controlplane nodes. Do not add new labels to any nodes. How to Schedule a Pod on Control Plane Nodes in Kubernetes In Kubernetes, there are scenarios where you might want to schedule a Pod to…

Read More

K8s – Question 1

You have access to multiple clusters from your main terminal through Kubectl contexts. 1.Write all those context names into /opt/course/1/contexts. 2.Next write a command to display the current context into /opt/course/1/context_default_kubectl.sh, the command should use Kubectl. 3.Finally write a second command doing the same thing into /opt/course/1/context_default_no_kubectl.sh, but without the use of Kubectl. Answer : Working with Multiple Kubernetes…

Read More

kubernetes-Learn-Index

Kubernetes Learning Path Kubernetes Installation Installation on Ubuntu 22.04: Install Kubernetes on Ubuntu 22.04 Main Sections Intro: Introduction to Kubernetes YAML Definition File: YAML basics and structure Labels, Selectors, and Annotations: Using labels and selectors Networking in Kubernetes: Understanding Kubernetes networking Kubectl Commands: Essential kubectl commands overview Objects Node: Nodes in Kubernetes explained Pod: Understanding…

Read More

How install Ollama on Windows and Ubuntu.

This guide provides step-by-step instructions for installing Ollama, a powerful AI tool, on Windows, Linux, and Mac operating systems. Follow along to ensure a smooth installation process and start utilizing Ollama for your AI and machine learning projects. Summary of Content Step-by-Step Guide: Installing Ollama on Windows Step-by-Step Guide: Installing Ollama on Linux Step-by-Step Guide:…

Read More

Git Create Repo

How to Create a Git Repository Creating a Git repository is essential for managing your project’s version control. This guide will walk you through the steps to set up a new Git repository, whether you’re starting a new project or importing an existing one. 1. Install Git Before you can create a Git repository, you…

Read More