1/107
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No study sessions yet.
What is Kubernetes?
An open-source container management solution for deploying, running, and orchestrating containers.
What is a Kubernetes cluster?
A group of one or more nodes managed by Kubernetes.
What components are found in every Kubernetes node?
A container runtime (e.g., Docker), kubelet, and kube-proxy.
What is the function of the Kubernetes control plane?
It manages the cluster and includes components like the API server, scheduler, and controller manager.
What is a pod in Kubernetes?
The smallest deployable unit that can be managed, representing a logical group of one or more containers.
What happens to a pod if the node it runs on fails?
The pod is deleted and can be replaced by an identical pod.
What is a label in Kubernetes?
A key/value pair attached to Kubernetes resources for organizing and selecting them.
What is the purpose of a label selector?
To define a set of resources based on their labels.
What does a replication controller do?
It manages a specified number of pod replicas and ensures they are running as intended.
What is the difference between a deployment controller and a replica set?
A deployment controller defines desired states for pods and can manage updates, while a replica set supports set-based selectors.
What is the function of a service in Kubernetes?
Provides stable networking for pods (IP, DNS)
Responsible to allow network access to a set of pods.
Services sit in front of the pods and distributes requests to them.
What are the types of services in Kubernetes?
ClusterIP, NodePort, and LoadBalancer.
What is the role of kubectl in Kubernetes?
A command line tool used to manage Kubernetes clusters.
What is the purpose of using declarative primitives in Kubernetes?
To maintain the desired state of applications and automate transitions from current to requested states.
What is the significance of the Kubernetes Dashboard?
A web UI for managing Kubernetes clusters running on the master node.

What is the role of etcd in the Kubernetes control plane?
Key-value database used as backing store for all cluster config data
How can Kubernetes be installed?
On various public and private clouds or bare metal servers.
What is the main purpose of container orchestration in Kubernetes?
To coordinate containers in clusters for complex applications.
What are the basic building blocks of Kubernetes?
Pods, labels, selectors, replication controllers, and services.
What is the difference between imperative and declarative orchestration?
Imperative orchestration involves direct commands, while declarative orchestration defines the desired state.
What does a NodePort service do?
Exposes pods to external traffic by forwarding traffic from a port on each node.
What is a ClusterIP service?
Exposes pods to connections from inside the cluster. Resource to resource communication
Virtual IP in cluster
What is a LoadBalancer service?
Exposes pods to external traffic and provides a load balancer.
Distributes traffic to different pods.
External traffic from the load balancer is directed to backend pods.
What does the environment variable 'environment' indicate in Kubernetes?
It indicates the deployment environment, such as 'dev' or 'live'.
What is the purpose of the 'release' selector in Kubernetes?
It specifies the release version, such as 'stable', in conjunction with the environment.
How does Kubernetes support service discovery?
Through environment variables and DNS.
What information do Kubernetes environment variables provide for services?
They include the service host and port, e.g., MYSQL_SERVICE_HOST and MYSQL_SERVICE_PORT.
What is a volume in Kubernetes?
A volume is defined at the pod level and is used to preserve data across container crashes.
What is the lifecycle of a volume in Kubernetes?
It has the same lifecycle as the pod that encloses it; when the pod is deleted, the volume is deleted.
What is a persistent volume in Kubernetes?
A persistent volume represents a real networked storage unit with a lifecycle independent of any individual pod.
What access modes does a persistent volume support?
It supports
ReadWriteOnce (RWO) by a single node
DB or apps that need exclusive write access
ReadOnlyMany (ROX) by many nodes simultaneously
config files, logs
ReadWriteMany (RWX) by many nodes simultaneously
shared storage, collaborative apps
What is a persistent volume claim?
It defines a specific amount of storage requested and specific access modes, binding to a matching persistent volume.
What happens if a persistent volume claim does not find a matching volume?
It remains unbound indefinitely until a matching volume becomes available.
What is the role of a job in Kubernetes?
A resource that allows you to create and manage a finite or batch process in your cluster.
Commonly used for tasks that need to be run once or a few times, such as data processing, backups, or migrations
What is a daemon set in Kubernetes?
Runs an identical pod in each node. Usually for monitoring, logging, network proxies.
A daemon set ensures that all or some nodes run a copy of a pod, tracking the addition and removal of nodes.
What is the purpose of a namespace in Kubernetes?
It provides a logical partition of the cluster's resources, allowing resources to have the same name in different namespaces.
What does a quota do in Kubernetes?
It sets resource limitations for a given namespace, such as CPU and memory, and forces users to request resource allotment.
What is the difference between imperative and declarative orchestration in Kubernetes?
Imperative orchestration involves manual steps, while declarative orchestration defines a target state for the system.
What is Minikube used for?
Minikube is used to run a single-node Kubernetes cluster on a local machine.
What types of jobs are available in Kubernetes?
Non-parallel jobs, parallel jobs with a fixed completion count, and parallel jobs with a work queue.
What is a config map in Kubernetes?
Key-value pairs to store config data
Can reference in deployment or mount to pod (env variables)
How can a Kubernetes secret be used?
It allows users to pass sensitive information to containers, such as passwords and authentication tokens.
What is the primary responsibility of a replication controller in Kubernetes?
To maintain the specified number of replicas of a pod.
What is a replica set in Kubernetes?
A replica set is an advanced version of a replication controller that supports selectors with set-based requirements.
What happens to pods created by a daemon set when it is deleted?
Deleting a daemon set will clean up the pods it created.
What is the significance of the 'notin' operator in Kubernetes selectors?
It specifies that a resource should not be in a defined set of values.
What does the 'in' operator do in Kubernetes selectors?
It specifies that a resource must be in a defined set of values.
Why it’s useful:
Group multiple environments, versions, or tiers
More flexible than equality-based selectors (key=value)
Essential for advanced scheduling and traffic routing patterns
What is the difference between a pod and a container in Kubernetes?
A pod is the smallest deployable unit that can contain one or more containers.
What is Minikube?
A tool that creates a local Kubernetes cluster by running a virtual machine.
What command is used to run a simple deployment in Kubernetes?
$ kubectl run hello-minikube --image=gcr.io/google_containers/echoserver:1.4 --port=8080
How can you expose a deployment in Kubernetes?
$ kubectl expose deployment hello-minikube --type=NodePort
What command checks the status of a pod in Kubernetes?
$ kubectl get pod
What is the default log rotation policy in Kubernetes?
Daily rotation or 10 MB, keeping up to five rotations.
How can you view logs for a specific container in a pod?
$ kubectl logs
What is a common logging agent used in Kubernetes?
Fluentd, often run as a DaemonSet.
How can you check available contexts in kubectl?
$ kubectl config get-contexts
What command confirms the current context and cluster in kubectl?
$ kubectl config view
What is the command to check if a pod is running?
Look for 'Running' in the STATUS field after executing $ kubectl get pod.
What should you do if a pod status shows 'ContainerCreating'?
Wait a few moments and repeat the last command.
What is a sidecar approach in logging?
Using a dedicated logging component in each pod to aggregate logs.
What is a disadvantage of direct logging from an application in Kubernetes?
It prevents the use of kubectl logs and can complicate log management.
What is the command to check logs of a crashed container?
$ kubectl logs
What is the role of a dedicated agent running on every node for logging?
To collect and forward logs to a centralized logging backend.
Where is the config file used by kubectl stored?
~/.kube/config
What command shows the current contexts in kubectl?
kubectl config get-contexts
How do you switch context in kubectl?
Use the command kubectl config use-context followed by the context name.
What is the first step in deploying an application in Kubernetes?
Create a Kubernetes secret to store sensitive information.
What values are encoded in Base64 for the Kubernetes secret?
Database name (app-db), username (app-user), password (app-pass), root password (app-rootpass).
What command is used to create a Kubernetes secret from a YAML file?
kubectl create -f app-secret.yaml
What is the purpose of a Persistent Volume in Kubernetes?
To provide underlying storage for applications like MySQL.
What command verifies the creation of a Persistent Volume?
kubectl describe pv/app-pv
What is the purpose of the PersistentVolumeClaim?
To claim a previously created Persistent Volume for use by an application.
What command is used to create a PersistentVolumeClaim?
kubectl create -f app-pvc.yaml
What does the 'volumeMounts' section in the deployment YAML specify?
It specifies where the persistent volume will be mounted in the container.
What is the command to create a Persistent Volume?
kubectl create -f app-pv.yaml
What does the 'accessModes' field in PersistentVolumeClaim specify?
It specifies the access mode for the volume, such as ReadWriteOnce.
What is the type of the Kubernetes secret defined in the example?
Opaque delete
What is the purpose of the 'selector' field in PersistentVolumeClaim?
To match the Persistent Volume based on labels.
What command verifies the creation of a Kubernetes secret?
kubectl get secrets
What is the significance of the 'replicas' field in the deployment spec?
It specifies the number of pod replicas to run.
What does the 'kind' field in a Kubernetes YAML file indicate?
The type of Kubernetes resource being defined (e.g., Secret, PersistentVolume, Deployment).
What is the command to create a MySQL deployment from its YAML file?
kubectl create -f mysql-deployment.yaml
What command is used to create the MySQL deployment?
$ kubectl create -f mysql-deployment.yaml
What command verifies persistent volumes in Kubernetes?
$ kubectl get pv
What command verifies persistent volume claims in Kubernetes?
$ kubectl get pvc
What command checks the status of deployments in Kubernetes?
$ kubectl get deployments
What is the purpose of a Kubernetes Service?
To provide a stable IP address that decouples from pods, allowing applications to connect to services without needing to track changing pod IPs.
What command is used to create the MySQL service?
$ kubectl create -f mysql-service.yaml
What command checks the details of a specific service in Kubernetes?
$ kubectl describe svc/mysql-service
What command is used to list all created pods in Kubernetes?
$ kubectl get pods
What does the 'selector' field in the service definition do?
It defines which pods the service targets based on matching labels.
What are some considerations for deploying a production-ready Kubernetes cluster?
High availability, robust and scalable networking, and multi-site support.
What is the role of kubelet in a Kubernetes cluster?
To manage the pods and containers on a node.
What should be restricted to enhance security in a Kubernetes cluster?
Direct access to cluster nodes, either physical or through SSH.
How can Kubernetes handle node failures?
By using external load balancers to redirect traffic to healthy nodes.
What is the recommended way to monitor services on the master node?
Implement process watchers to monitor the health of services.
What does Kubernetes allow regarding node management?
Adding and removing nodes dynamically.
What is Stratoscale Symphony?
A cloud infrastructure solution providing Kubernetes-as-a-Service for easy cluster management.
What is the first step in creating a new Kubernetes cluster using KubeCtl?
Assign storage and network for the cluster.
What is the significance of the floating IP in a Kubernetes cluster?
It serves as the cluster's endpoint for network access.