Sandbox Flashcards

1
Q

FaaS adv and disadv

A

Advantages:
q No provisioning of servers.
q Automatic scaling.
q Reduction of costs.
q Underlying servers shared among different function invocations.
Disadvantages:
q Focused on stateless functions.
q Performance variations due to restart latencies.
q Not suitable for heavy compute-intensive workloads, own VMs might be cheaper.
q Limited security: shared VMs, no control over the network

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Containers vs VMs

A

Containers
§ Using Linux primitives.
§ Share Linux Kernel.
§ Fast Starts, minimal overheads.
§ Flexible Isolation.

Virtual Machines
§ Virtualisation or emulate hardware components.
§ Completely separate kernels.
§ Slower starts, must boot kernel and set-up
hardware.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Container Ecosystem

A

CRI
Defines an API between K8s and the container runtime.
OCI
Specifications for container images and running containers.
Runc
Implementation of the OCI Spec.
Responsible for creating and running the container processes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Containerd

A

Industry-standard container runtime.
Manages complete container lifecycle of its host system, e.g., image transfer and storage,
container execution and supervision.
Fully supports OCI runtime specification for running containers.
Supports snapshotting.
Supports running sandboxes through containerd-shims.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

shim

A

Piece of software that resides between
containerd and a low-level container runtime
(runc, runsc).
Abstract low-level runtimes.
Lives as long as the container process.
In contrast, OCI runtimes just start a fork/exec
container process and then exits.
Intercepts container’s stdin, stdout and stderr
streams and redirects them to logs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

gVisor

A

Open-source, secure-container runtime, developed by Google

Sentry intercepts the syscalls made by the application
Only few syscalls are made by the sentry to the host linux kernel
Seccomp profile for filtering allowed syscalls by the sentry
Access to filesystem via a separate process called gofer.
Drawbacks:
* Not well suited for syscall heavy workloads
* Not all syscalls are implemented
* Uses containerd-shim-v1 API

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

AWS Firecracker

A

VMM that uses KVM to create and manage microVMs.
q Specifically designed for serverless computing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Kata Containers

A

Secure and isolated containers with a seperate kernel

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

WebAssembly

A

Binary format, with alternative human-readable
text representation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

WebAssembly module

A

Application code as WASM ISA
Defines functions, globals, memories, imports,
exports, static data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

WebAssembly Embedder

A

Parses WASM modules and executes the
application code
Execution strategies:
* Interpreter (Blockchain Smart Contracts,
Browser)
* JIT (Browser, Standalone)
* AOT (Standalone)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

krustlet

A

Enables running WebAssembly workloads natively on Kubernetes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Knative

A

Platform which deploys on top of K8s.
Knative Eventing enables event-driven
architecture for applications, e.g.,
producer/consumer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Knative Serving

A

Provides scale-to-zero, request-driven
functionality

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Traditional CI/CD Push-based Workflow

A

Starts with the CI system and then continues its path through a series of encoded scripts
to push changes to the Kubernetes cluster.

Adv:
✚ ease of use
✚ Not bound to the specific tool

Disadv:
− Cluster credentials are inside the build
system, requires to open the firewall.
− CI/CD through scripts is not declarative and
takes effort to make idempotent and
reconcile the state.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

GitHub actions

A

Platform that allows to automate the build, test, and deployment pipeline.

17
Q

GitOps

A

A way to manage cloud-native applications/Infrastructure.

A GitOps agent (Flux, ArgoCD) automatically applies all code, configuration, &
policies across environments.

If there is any divergence between Git and what’s running in a cluster, Kubernetes
reconcilers automatically update or roll back the cluster.

18
Q

GitOps Pull Workflow for Application Deployment

A

In pull-based approach, all changes are applied from inside the cluster.
* There is an operator/agent inside the cluster, that regularly scans the associated git
repositories and docker registries and if a change occurs, the cluster state will be
updated from inside.

Adv:
✚ No external client has the right to publish
to the cluster, all updates are coming
from inside.
✚ changes can be automatically detected
and applied without human intervention
easier scaling of identical clusters

Disadv:
− Through the pull approach, you are
bound to the tools executing the pull.
− limited to Kubernetes only

19
Q

Kustomize.io

A

Kustomize is a configuration management solution.
* It leverages layering to preserve the base settings of your applications and components
* Selectively override default settings without actually changing the original files by
overlaying declarative yaml artifacts (called patches).

20
Q

Continuous Delivery Sync (ArgoCD)

A
  • It is a declarative, GitOps continuous delivery tool for Kubernetes.
  • ArgoCD follows the GitOps pattern of using Git repositories as the source of truth.
  • Kubernetes manifests in ArgoCD can be specified in several ways:
  • kustomize applications
  • helm charts
  • jsonnet files
  • Plain directory of YAML/json manifests
  • ArgoCD is implemented as a Kubernetes controller.
  • It continuously monitors running applications and compares the current, live state
    against the desired target state (as specified in the Git repo).
21
Q

Infrastructure-as-Code Automation (Terraform)

A

Terraform is an infrastructure
as code tool that allows to
build, change, and version
infrastructure safely and
efficiently.

22
Q

Open Policy Agent (OPA)

A
  • Policy engine to provide a common framework
    for applying policy-as-code to any domain.
  • OPA provides a high-level declarative language
    (Rego) for writing policy as code.
  • When a policy decision needs to be made, a
    service sends JSON as input to OPA, then OPA
    after evaluation returns the decision.
23
Q

Policy-as-Code in IaC Automation using Regula

A

PaC can be integrated with IaC to
automatically enforce infrastructural policies.
* Regula is a tool that evaluates IaC files for
potential security and compliance violations
prior to deployment.
* Regula includes a library of rules written in
Rego.
* The Regula CLI is built using Go and it reads in
infrastructure as code files and uses OPA to
evaluate them against Regula’s library of rules.