stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
COMP315 - Cloud Computing - Kubernetes Flashcards | StudBud
Explore
/
COMP315 - Cloud Computing - Kubernetes
COMP315 - Cloud Computing - Kubernetes
127 terms
·
StudBud Administration
·
2 plays
Imported from external platform
Flashcards
127 cards
F
Practice quiz
P
Host live
L
Questions
127
Answers
1
which kubectl command is used to delete all resources in the current namespace?
kubectl delete namespace *
kubectl remove resources --namespace=default
kubectl delete all --all
kubectl destroy all --all
2
What happens if the scheduler can't find a node that meets a task's resource requirements?
the pod is deleted and the deployment is retried
the task remains pending until a suitable node is found
the pod is assigned to the node with the least traffic
Kubernetes automatically increases the CPU and memory limits for the pod
3
Kubernetes initialisation can be done with kubeadm. What does the command "kubeadm init" do?
initialises a kubernetes control-plane node
installs the Kubernetes Dashboard on the control plane node
starts all pods defined in the default namespace
creates a default deployment and service for the Kubernetes API
4
Which kubectl command can be used to delete a service?
kubectl remove service <name>
kubectl destroy service my-service
kubectl kill <name>
kubectl delete svc <name>
5
What must the OS of worker nodes be?
rocky
either linux or windows
Linux
windows
6
What can istio's prometheus addon be used to gain?
real-time firewall configuration capabilities
visibility into containerised workloads, APIs and other services and apps
detailed service deployment history
automatic failover and recovery for pods
7
which worker node component manages the lifecycle of containers?
kube proxy
kubelet
all of them
container runtimes
8
which minikube command lets us see the minikube VM's ip address?
inikube status ip
minikube ip show
minikube ip
minikube get ip
9
which of these Kubernetes control plane components handles routine tasks in the cluster?
controllers
scheduler
API Server
Cluster store
10
When configuring a k8s cluster, we must let each node know the ip addresses of the other nodes. How do we do this?
by adding all node IPs to /etc/hosts using an ansible play
by adding all node IPs to /etc/resolv.conf
by creating a nodes.yaml file in the kubelet config directory
by exporting the IPs as environment variables in each pod
11
what do kubernetes Services do?
automatically scales the number of pods based on network traffic
creates a unique, persistent IP address and domain name for a deployment
manages the DNS settings for the entire Kubernetes cluster
handles storage management for persistent volumes
12
what does a Deployment do in kubernetes?
manages secrets and encrypts sensitive data
creates a persistent storage volume for each pod
monitors cluster health and automatically fixes broken nodes
manages pods
13
which minikube command let's us access a service in our default web browser?
minikube browse
minikube service <name>
minikube service --browser
minikube open
14
what does kubernetes use manifests for?
to track real-time metrics and generate performance reports
to execute shell scripts inside containers
to store logs and debugging information for node
create, update and delete resources
15
which of these is used by a control plane's internal components to communicate with each other?
scheduler
API server
controller manager
controller
16
what kubectl command can we use to get detailed information about a pod?
kubectl describe pod <pod name>
kubectl -a pod <pod name>
kubectl display <pod name>
kubectl show-pod <pod name>
17
which Node.JS application is deployed to kubernetes?
app.js
index.js
Nodemon
express.js
18
Which kubectl command shows all services running?
kubectl view services
kubectl get svc
kubectl get all-services
kubectl list services --running
19
what line of code creates a constant called "app" which stores an instance of express?
const app = express.createServer();
const app = new express.App();
const app = express()
let app = new Express();
20
When are files saved to /etc/sysctl.d/ read?
only when the system enters runlevel 3
on boot
whenever a service managed by systemd is restarted
after the kernel finishes loading all modules
21
What command can we use in a virtual machine terminal to obtain its ip address?
ip address
ip-address
ipconfig
ifconfig
22
Kubernetes will run any type of container that adheres to the __________
Container Stack (CS) standard
Open Container Initiative (OCI) standard
Open Control Protocol (OCP)
Container Standard (CS)
23
which kubectl command displays the nodes in a cluster?
kubectl get nodes
kubctl list nodes
kubectl nodes
kubectl -l nodes
24
which kubectl command gives the following output?
kubectl get containers
kubectl get namespaces
kubectl get nodes
kubectl get pods
25
Which kubernetes node runs the containers?
control node
cluster node
control plane node
worker node
26
what command can we use to check the status of SELinux (which tells us whether it's disabled or not)?
status
services
sestatus
ps
27
When rebuilding a container, what dockerfile command ensures we don't install the same dependencies again?
COPY . .
COPY package.json package-lock.json ./
COPY . ./
COPY dependencies /app
28
Which kubectl command deletes all resources defined in a manifest file?
kubectl delete -f <manifest filename>
kubectl purge -f <manifest filename>
kubectl clear -f <manifest filename>
kubectl reset -f <manifest filename>
29
what kubectl command allows us to create a service for a deployment?
kubectl service <name> --port=<number> --target-port=<number>
kubectl expose <name>
kubectl service <name> --port=<number>
kubectl expose <name> --port=<number> --target-port=<number>
30
Which of these is
NOT
a functionality of orchestration software?
zero downtime updates and rollbacks
scaling of apps' resources in response to demand
writing application logic on the fly
restarting apps that have crashed (self-healing)
31
After telling each of the nodes each others' IP addresses, we need to install containerd. What's containerd?
a container runtime that's a stripped down version of docker
a firewall tool used to manage network policies between pods
a service that automatically scales deployments based on CPU usage
a CLI for managing Kubernetes clusters and services
32
What does the API server do?
processes and actions API requests by updating the cluster store
compiles container images before deploying them to the nodes
distributes incoming traffic evenly across services
manages all internal Kubernetes logging and observability metrics
33
Assuming we've created an express app. How do we create an endpoint that accepts HTTP get requests on "/"
app.on("GET", "/", (req, res) => {});
app.request("GET", "/", (req, res) => {});
app.get("/", (req, res) => {});
app.addRoute("GET", "/", (req, res) => {});
34
where are containerd's configuration settings stored?
/opt/containerd/settings.ini
/etc/docker/containerd.yaml
/etc/kubernetes/containerd.conf
/etc/containerd/config.toml
35
what is the most common cluster store used in Kubernetes?
Redis
MySQL
etcd
Cassandra
36
which kubectl command allows us to performing a rolling update to an image in a deployment?
kubectl set image deployment <name> <image url>
kubectl update deployment <name> --image=<image url>
kubectl modify deployment <name> --image=<image url>
kubectl set image <name>=<image url>
37
The kubernetes control loop watches the current state of resources in the cluster through what?
controller-manager and scheduler
kubelet
kubectl
events and API states
38
which kubectl command shows the status of a rolling update?
kubectl rolling update <name> --show
kubectl rollout status deploy <name>
kubectl set image <name> image=<image url> --status
kubectl rollout update <name> --status
39
which kubernetes component specifies the desired state of the cluster?
API server
scheduler
controller
controller manager
40
what is the container name for the kubernetes scheduler?
k8s_scheduler
k8s_cluster-scheduler
k8s_schedule
k8s_kube-scheduler
41
what does "kubectl apply -f deployment.yaml" do?
launches a debugging session for the deployment defined in the file
installs Kubernetes on your local machine using the YAML file
creates a deployment using the deployment.yaml manifest
converts the YAML file into logs for auditing purposes
42
What kubectl command lists all pods in the istio-system namespace?
kubectl list pods --istio
kubectl get pod -n istio-system
kubectl get all --namespace=pods-istio
kubectl show pods -n istio-system
43
which of these Kubernetes control plane components manages controllers?
scheduler
controller manager
Cluster store
API Server
44
why does kubernetes use replication or run replicas across multiple availability zones (AZs)?
To increase the speed of deployments by running the same pod multiple times
to achieve high availability
To improve networking speed by keeping pods closer to users
o improve security by distributing workloads across multiple networks
45
when setting up kubernetes, which of these linux features do we need to disable?
User namespaces and DNS caching
swap partitions
swap disk and SELinux
FirewallD
46
what is the default behaviour of kubelets is swap memory is detected on a node?
they will fail
they automatically delete the swap partition
they throttle pod CPU usage
they run pods in a paused state
47
In the following ansible playbook snippet, what does the "reload sysctl" handler wait for?
a signal from the firewall daemon
the system to reboot to apply kernel changes
a notification from a task saying "reload sysctl"
until all services using sysctl are stopped
48
what is the wheel group used for in a k8s cluster node?
enables a user to run kubectl commands as root
grants access to the Kubernetes API server logs
granting sudo privileges to the user
allows users to manage Kubernetes deployments directly
49
which kubectl command gives the following output?
kubectl get containers
kubectl get pods
kubectl get nodes
kubectl get namespaces
50
what is the container name for the kubernetes key value store?
k8s_kube-keyvalue-store
k8s_kube-etcd
k8s_keyvalue-store
k8s_etcd
51
What minikube command opens a service?
minikube expose service <service name>
minikube browse service <service name>
minikube run service <service name>
minikube service <service name>
52
where does orchestration software sit in data centre servers?
Ontop of the hardware
ontop of containers
above the applications
ontop of the kernel
53
What do kubernetes pause containers do?
maintain CPU affinity across multiple containers in a pod
prevents loss of network configs when a worker container terminates
store container logs before forwarding them to a log collector.
delay the pod’s startup until all containers are ready
54
what happens if we delete a pod?
kubernetes automatically creates a new one to replace it
all other pods in the deployment are restarted
the deployment is deleted automatically
the cluster enters a failed state until it's manually fixed
55
what is the container name for the kubernetes worker node's kube proxy?
k8s_proxy
k8s_ecs-proxy
k8s_kube-proxy
k8s_http
56
Which kubectl command can be used to scale a deployment to have 4 pods of the same app?
kubectl scale pods <app name> 4
kubectl scale deployment <app name> --replicas=4
kubectl set deployment <app name> --scale=4
kubectl increase deployment <app name> --replicas=4
57
Which kubectl command creates a NodePort service exposed on port 3000?
kubectl expose service <app name> --target-port=3000 --type=NodePort
kubectl create service NodePort <app name> --port=3000
kubectl expose deployment <app name> --type=NodePort --port=3000
kubectl expose service <app name> --target-port=3000 --type=NodePort
58
what does the control plane do in an Istio service mesh?
handles container creation and volume mounting
configures sidecars
stores logs and application metrics in the cloud
authenticates users and issues access tokens
59
What kubectl command shows the labels ?
kubectl show pods -n istio-system
kubectl list pods --istio
kubectl get pod -n istio-system
kubectl get all --namespace=pods-istio
60
Which kubectl command shows us more information about a specific pod, such as creation date and the containers it holds?
kubectl show pod <pod name>
kubectl get pod <pod name> --info
kubectl logs <pod name>
kubectl describe pod <pod name>
61
to ensure k8 networking, we need to set some kernel parameters. What happens when we set the following parameter?
enables ipv4 encryption for pod-to-pod traffic.
forces the kubelet to use static IPs for all pods
enables ip forwarding
restricts packet routing to the master node only
62
When configuring containerd, we need to enable the systemd cgroup driver. How do we do this?
run "containerd config use-systemd" in the terminal
set "SystemdCgroup = true" in the containerd config file
create a symbolic link from "/sys/fs/cgroup/systemd" to "/etc/containerd/"
Set "cgroup_driver = 'systemd'" in "/etc/systemd/system/containerd.service"
63
which kubectl command displays the deployments in a cluster?
kubectl get deployments
kubectl -l deployments
kubctl list deployments
kubectl deployments
64
which kubectl command gives the following output?
kubectl get namespaces
kubectl get pods
kubectl get containers
kubectl get nodes
65
Why is LoadBalancer the preferred way to expose services in production environments?
It creates a cloud load balancer to route traffic on cloud providers
It provides an automatic DNS service for all services
It automatically scales the service based on traffic volume
It ensures high availability by distributing traffic across multiple nodes
66
Which linux OS file defines how partitions, storage devices and remote file systems are mounted into the directory tree?
etc
init.d
fstab
swap.conf
67
what are manifests?
YAML/JSON files that define resources (pods, depoyments, services etc)
commands used to monitor services and deployments
terminal outputs that show pod activity and health
log files generated by running Kubernetes pods
68
Kubernetes initialisation can be done with kubeadm. What does the command "kubeadm join" do?
installs the Kubernetes Dashboard on the control plane node
creates a default deployment and service for the Kubernetes API
starts all pods defined in the default namespace
initialises a kubernetes worker node and joins it to the cluster
69
Which kernel module facilitates VxLAN traffic for kubernetes pods across the cluster nodes?
br_netfilter
overlay
netfilter_vxlan
ip_tables
70
to disable SELinux, what ansible module do we need to access?
etc.shared.selinux
selinux.activate
ansible.posix.selinux
usr.tmp.selinux
71
how do you port forward istio's grafana service from port 3000 to localhost's port 3030?
kubectl connect grafana --local 3030 --remote 3000
kubectl forward grafana 3030:3000 -n istio-system
kubectl proxy grafana 3030:3000 -n istio-system
kubectl port-forward svc/grafana -n istio-system 3030:3000
72
what is the container name for the kubernetes controller manager?
k8s_controllermanager
k8s_controller-manager
k8s_kube-controller-manager
k8s_kube-controllermanager
73
what kubectl command can we use to run a pod?
kubectl start <pod name>
kubectl run <pod name>
kubectl build pod <pod name>
kubectl run pod <pod name>
74
How does the kubernetes scheduler work?
balances memory usage between running containers
assigns IP addresses to each pod automatically
watches the API server for new tasks and selects a node for them to run on
launches new nodes when CPU usage is high
75
When installing kubernetes on all of our cluster nodes - where do we add the following lines?
/usr/bin/k8s-init.sh
/etc/kubernetes/kubelet.env
/etc/yum.repos.d/kubernetes.repo
/etc/fstab
76
what line in fstab should be commented out to disable swap?
defaults
/etc/swapspace
/dev/null
/dev/mapper/rl-swap
77
which of these is
NOT
a task performed by Kubelets?
watches API server for new tasks
delegates new tasks to container runtime(s)
routes traffic to the correct pods using load balancing
reports status of tasks to API server
78
What does the cgroup API allow kubelet and the underlying container runtime to do?
install kernel modules inside containers
enforce resource management for pods and containers
schedule pods across multiple nodes
generate container logs and send them to fluentd
79
which kubectl command can we use to create a deployment?
kubctl build deployment <name> <image name>
kubectl create deployment <name> --image-<image name>
kubectl start deployment <name> --image-<image name>
kubectl deployment <name> <image name>
80
What do rolling updates do?
replaces old version with instances of new version one at a time
automatically scale the number of replicas based on the traffic load
restart the deployment at a fixed interval to ensure availability
delete old pods and create new ones all at once for faster deployment
81
What do you add to a k8s cluster to add capabilities like traffic management without needing to change your containers?
API gateway
ingress controller
service mesh
helm chart
82
what does the data plane do in an Istio service mesh?
manages cluster roles and RBAC policies
installs control plane components on each node
provides communication between services in a cluster
configures services and deploys new pods
83
which worker node component provides networking for the node?
container runtimes
kube proxy
kubelet
all of them
84
What does the following kubeadm command do?
joins worker nodes to the cluster
joins additional control-plane nodes to the cluster
removes any taints from the control plane node
runs a rolling restart of all system pods in the cluster
85
what are the smallest deployable units of computing in kubernetes?
pods
containers
jobs
nodes
86
What kubectl command adds a label to the default namespace? Where the key is "istio-injection" and value is "enabled"?
kubectl label pod default istio-injection=enabled
kubectl annotate namespace istio-injection=enabled
kubectl add label default istio-injection=enabled
kubectl label namespace default istio-injection=enabled
87
What does the following kubeadm command do?
joins worker nodes to the cluster
joins additional control-plane nodes to the cluster
removes any taints from the control plane node
runs a rolling restart of all system pods in the cluster
88
what file in Rocky should we edit to disable swap?
/etc/rc.local
/etc/init.d/swap
/etc/systemd/swap.conf
/etc/fstab
89
what kubectl command can we use to delete a pod?
kubectl delete pod <pod name>
kubectl remove <pod name>
kubectl rm pod <pod name>
kubectl delete <pod name>
90
which of these Kubernetes control plane components acts as the frontend for the control plane?
API Server
scheduler
Cluster store
controllers
91
what minikube command starts a minikube cluster?
minikube
minikube build
minikube start
minikube run
92
br_netfilter allows packets forward by a linux system to be changed as if they were sent by a local system. What's this?
loopback rewrite
transparent masquerading
virtual NAT bridging
source tunneling
93
What does istio's kiali addon do?
allows you to configure, visualise validate and troubleshoot your mesh
automatically scales services based on traffic
encrypts all service-to-service communication
manages Kubernetes secrets across namespaces
94
How can we expose a service outside a cluster?
using kubectl publish service --external
using kubectl expose --public
by changing it's type to either NodePort or LoadBalancer
by adding an external IP directly to the pod
95
What must the OS of the of a control plane node be?
Linux
rocky
any OS
windows
96
which of these Kubernetes control plane components is a key value store?
scheduler
controllers
API Server
Cluster store
97
which of these is
NOT
held in a kubernetes pod?
one or more containers
storage resources
unique network IP
load balancer configurations for external traffic
98
which of these is
NOT
a control plane component?
kube proxy
API server
controller
scheduler
99
which minikube command gives the following output?
minikube run
minikube status
minikube start
minikube build
100
what is the name given to large codebases which package entire applications?
monoliths
monorepo
microservice
microlith
101
After initialising a k8s cluster, we need to create a non-root user in what group to interact with it?
netadmin
k8s-admins
docker
wheel
102
What are microservices?
lightweight versions of full applications used for testing
style of architecture that allows running lots of containers
smaller versions of operating systems designed for embedded devices
cloud-based tools that help optimise network traffic
103
what does the cluster store hold?
temporary pod data used during scaling events
info about k8s objects, such as pods, services and deployments
logs of all pod-level communication across the network
only the list of available container images
104
Which directory does the kernel read files from during boot to load the modules specified in them?
/boot/modules/
/etc/loadmod.d/
/etc/modules-load.d
/etc/kernel/init.d/
105
What do we need to install to set up networking between our cluster nodes after having set them up and configured them?
A cloud provider's network plugin like AWS VPC CNI
an overlay network such as Calico
Kube-router
Kubernetes Ingress Controller
106
what 2 linux kernel modules need to be added to all nodes when setting up kubernetes?
docker_bridge and container_runtime
kube_auth and pod_sync
overlay and br_netfilter
k8s_loader and mod_kube
107
Which deployment strategy rolls out new versions of a service to prod by gradually shifting traffic to the new version?
progressive scaling
canary releases
shadow cloning
blue-red deployment
108
which of these are constantly checked by the control loop and compared to the desired states in kubernetes config?
Active network connections between services
CPU and memory usage of individual containers
Deployment version history logs
API states of Kubernetes resources
109
After scaling and exposing the deployments using a service. Why are different host names printed when we curl?
Kubernetes assigns a new hostname every time a pod is accessed
service is load balancing requests between pods with different hostnames
The service rewrites the hostname in round-robin fashion
Each replica randomly generates a hostname every few seconds
110
Which istioctl command installs istio onto a kubernetes cluster?
istioctl install
istioctl setup install
istioctl deploy cluster
istioctl init kube
111
how does the istio data plane achieve communication between services in a cluster?
establishing a central proxy server that routes all traffic
by deploying a sidecar ("envoy" container) with each service
injecting routing logic directly into the application code
replacing Kubernetes DNS with a custom routing layer
112
If a kubelet can't run a task, it reports back to what control plane component which then takes action fix the issue?
API server
controller manager
controller
scheduler
113
Which kubernetes node is responsible for managing the cluster?
control node
cluster node
control plane node
worker node
114
Which kubectl command can be used to get all running pods and
show more information
?
kubectl list pods --verbose
kubectl show pods -a
kubectl get pods -o wide
ubectl pods get-all --details
115
how do we set the Express webserver stored in "app", to listen on port 3000?
app.listenOn(3000, () => {});
app.startServer(3000, () => {});
app.listen(3000, () => {});
app.start(3000, () => {});
116
What does Istio generate for all service communications, making it possible to troubleshoot, maintain and optimise apps?
telemetry data
custom Dockerfiles for each container
static IPs for all microservices
configuration scripts for CI/CD pipelines
117
Which kubectl command creates a service to expose a deployment
named
"hello"
on
port 3000
?
kubectl create service hello --type=LoadBalancer --port=3000
kubectl expose service hello --port=3000
kubectl expose deployment hello --port=3000
kubectl publish deployment hello --port=3000
118
which namespace do istio addon pods run in?
istio-addons
kube-system
istio-system
addons-istio
119
which kubectl command displays the pods in a cluster?
kubctl list pods
kubectl get pods
kubectl pods
kubectl -l pods
120
which of these components is available on each worker node, to run containers?
all of them
kubelet
kube proxy
container runtimes
121
what happens if something goes wrong during the deployment of an updated image?
The new pods continue running even if they fail
Kubernetes shuts down the cluster to prevent further errors
Kubernetes deletes the entire deployment and waits for manual intervention
kubernetes automatically rolls back to old version of the image
122
which of these Kubernetes control plane components schedules work to be done?
scheduler
API Server
Cluster store
controllers
123
what is the container name for the kubernetes API server?
k8s_kube-server
k8s_kube-api
k8s_api-server
k8s_kube-apiserver
124
Which kubectl command deletes a pod?
kubectl destroy pod <pod-name>
kubectl terminate pod <pod-name>
kubectl delete pod <pod name>
kubectl remove pod <pod-name>
125
Where do we install the network overlay?
only on the master node
on the root user's home directory
only on the worker nodes
on both the master and worker node
126
Which of these are records of what happens in a cluster. (e.g. scheduler/kubelet decisions, pods and deployment changes)
API states
events
logs
history
127
The kubernetes controller manager runs the controller. What does the controller do?
encrypts traffic between pods
installs network plugins on each node
makes changes to the cluster state until it matches the desired state
manages user access control across the cluster