Kubernetes & GKE Flashcards
(36 cards)
What is a Pod?
A pod is a scheduling unit that contains one or more containers guaranteed to be co-located on the same node.
Pods have an unique IP address within their cluster that allows applications to connection with them.
Within a pod, all containers can reference each other.
What is a service?
A service is a collection of pods that work together.
The pods used in the service are defined by a label selector.
What are the two modes of service discovery?
Kubernetes DNS and environment variables.
What is service discovery?
The process of automatically detecting devices and services on a network.
How does service discovery work in Kubernetes?
It assigns a service an unchanging IP and DNS name, and loads balances traffic across the service pods using round robin.
What is a volume?
A volume is a persistent filesystem for pods.
It lasts as long as the pod does and can be accessed by the containers in a pod.
What is a label?
A label is key/tag used to identify an API object (Nodes, pods, etc).
What is a label selector?
A label selector is a query against labels to find matchings objects.
What is a workload?
A workload is a high-level abstraction to make managing pods simpler.
What is a ReplicaSet?
A ReplicaSet is a workload that manages a stable set of replica pods.
It is defined using a label selector which, when evaluated, will identify all the pods related to it.
What is a ReplicationController?
A ReplicationController is the predecessor of a ReplicaSet. It works in the same way, but has been deprecated to make use of label selectors.
What is a Deployment?
A Deployment is a higher-level management tool for ReplicaSets.
It controls what happens to a ReplicaSet (whether it needs to updated or rolled bac, etc).
When a Deployment scales vertically, the declaration of the ReplicaSet changes and this change is managed by the ReplicaSet.
What is an Ingress object?
An Ingress object is an API object that exposes and manages access to a service (within a cluster) to outside the cluster, typically via HTTP/S.
Ingress may provide load balancing, SSL termination and name-based virtual hosting.
Ingress requires an Ingress Controller to work. Just creating one won’t do anything.
What are the two ways of handling configuration information in Kubernetes?
ConfigMaps and Secrets.
What is a ConfigMap?
A ConfigMap is an API object used to store non-confidential config data in a key/value pair.
They can be used as environment variables, command-line arguments, or configuration files in a Volume.
What is a Secret?
A Secret is an API object that contains sensitive data (e.g., password, OAuth token, etc).
They are meant for holding sensitive data, but are not encrypted at rest. In addition, anyone with API access or access to etcd are view the Secret’s value.
How do you protect a Secret?
By
1) Enabling Encryption at Rest for Secrets
2) Enabling/Configuring RBAC rules with least-privilege access to Secrets
3) Restrict Secret access to specific containers
4) Using external Secret store Providers
What is GKE Application-layer Secrets Encryption?
Application-layer Secrets Encryption is an GKE offering that uses Keys from Cloud KMS to encrypt sensitive data stored in etcd.
What is etcd?
A consistent and highly-available key-value store used as a backing store for cluster data.
You will need a data backup plan for the etcd data.
What is a network policy?
An construct that specifies how a pod communicates with various network entities(endpoints, services, etc) over a network.
Network policies apply to connections with pods at either end only.
What are the three identifiers used to define the entities a NetworkPolicy permits connection to?
Other pods
Namespaces
IP blocks
What are the selectors to define the allowed pods in a NetworkPolicy?
Label Selectors for pod and namespace based policies.
IP ranges for IP-Block based policies.
What are the pre-requisites of NetworkPolicies?
A network plugin thst supports NetworkPolicy.
Otherwise, creating a policy has no effect.
What GKE Ingress?
GKE Ingress is a built-in and managed Ingress controller. This controller implements Ingress resources as Google Cloud load balancers for HTTP(S) workloads in GKE.