Core Concepts Flashcards
What makes a declaritive approach different from an imperitive? Can you relate to a comparison between a yaml-definitionfile and running a command?
Declaritive is the desired outcome, white imperitive is focused on steps resulting in micromanagement. The definition file is seen as a declaritive approach while running commands is more imperative.
Why should we use Kubernetes?
Kubernetes gives us a framework with standardised plugins for orchestrating containers. Without it we’d result to custom applications and scripts, widely different between organisations.
In ETCD, how are the –advertise-client-urls and —-internal-cluster used?
–advertise-client-urls is the IP that ETCD is listening on while –internal-cluster is used for grouping cluster members in a HA setup.
Is there something ETCD does not store?
No, all information about any objects in the Kubernetes clsuter is stored in the ETCD database.
Besides being the center of attention, how does the kube-apiserver differ compared to other components?
The kube-apiserver also manages authentication and is in contact with ETCD.
kube-controller-manager monitors and reacts to changes to comply with the monitoring. Describe the manger component for the nodes.
Nodes are monitored with a 5 sec heartbeat and have a grace period of 40 sec. Should there have been 5 min then the node is removed and any containers will be recreated on other nodes.
How does the kube-scheduler decide which containers get placed where by the kubelet?
First phace filters with for eg. hardware and second looks at a 0-10 score after the container is placed on the node. The higher score decided which node gets the container which means there were more resources available after.
Whats the difference when comparing the scheduler and kubelet components?
The scheduler instructs the kubelet where to load/unload containers.
Besides aiding in communication, what is the role of kube-proxy?
To search for services and on each node add rules with for eg. iptables on how to reach them.
How would you describe a POD?
A pod is the smallest object in Kubernetes and typically form a 1to1 relationship between pods and containers. When scaling the application, add more pods.
Can you describe the most basic top/root-level properties below?
apiVersion:
kind:
metadata:
spec:
apiVersion: depends on the kind kused
kind: type of object
metadata: data about object
spec: object type configuration
How do some kubernetes master/woker components differ when distributed with kubeadm and service?
kubeadm creates pods for the components with the configuration located under /etc/kubernetes/manifests/ where the service points to /etc/systemd/system/
Both ReplicationController and ReplicaSet are used to conform and scale pods, but what does RS bring to the table?
RS adds the key selector: under spec: which filters pods outside of the RS. This means the RS can include pods not created by the RS itself.
When creating a ReplicaSet the version needs to be what?
apps/v1
When using a ReplicaSet with selector: key, whats critical in the creation?
Matching must be equal to the labels under template: key.