A hands-on Kubernetes practice repository used as a personal reference.
It includes tested YAML manifests and notes created while learning and experimenting with core Kubernetes concepts. Each folder focuses on a specific topic and reflects real configurations I applied to understand Kubernetes internals and workflows.
Node: A worker machine in Kubernetes, part of a cluster.Cluster: A set of Nodes that run containerized applications managed by Kubernetes.- For this example, and in most common Kubernetes deployments, nodes in the cluster are not part of the public internet.
Edge router: A router that enforces the firewall policy for your cluster.- This could be a gateway managed by a cloud provider or a physical piece of hardware.
Cluster network: A set of links, logical or physical, that facilitate communication within a cluster according to the Kubernetes networking model.Service: A Kubernetes Service that identifies a set of Pods using label selectors.- Unless mentioned otherwise, Services are assumed to have virtual IPs only routable within the cluster network.
- Config Maps
- Containers
- Deployments
- Daemon Sets
- Images
- Ingress
- Jobs
- Cron Jobs
- Namespaces
- Nodes
- Pods
- Probes
- Roles
- Roles Bindings
- Secrets
- Services Accounts
- Services
- Stateful Sets
- Volumes
In PowerShell, type the following command:
notepad $PROFILE
Open notepad and save this command:
Set-Alias -Name k -Value kubectl
Now can use "k" as kubectl
kubectl create -f deployment.yml
k get deployments
k set image deployment/fitness-app mysql=mysql:8.0
k rollout status deployment/fitness-app
k rollout history deployment/fitness-app
k rollout undo deployment/fitness-app
Kubectl is a Command line tool for communicating with a Kubernetes cluster.
k versionk get nodesk run mysql --image mysqlk get podsk describe pod mysqlk get pods -o widek create -f pod-definition.ymlk delete pod pod-namek edit pod pod-nameKubernetes uses yml file as an input to create pods, replicas, deployments, services and so on,
The yml files contain four top level fields-
- apiVersion: Depending on what we need to create use apiVersion, for creating pods use version v1
- kind: Type of object we want to create such as Pod
- metadata: Data about the object like name, labels and app.
- spec: Specification
k create -f replicaset.yml
k get replicaset
k delete replicaset replicaset-name
k replace -f replicaset.yml
k scale -replicas=6 -f replicaset.yml