Application deployment Flashcards
What are two important concepts in Kubernetes deployment ?
Infrastructure as Code (IaC) and GitOps
Why does kubernetes use yaml ?
Yaml Ain’t MarkUp Language, it uses Kubernetes because it easily portable and human readable
Why do you create different namespaces ?
In order to separate and organize your different applications and microservices.
Also great for seperating environments
How do you assign namespaces with kubectl and a yaml file?
kubectl apply -f namespace.yaml
How does Kubernetes ensure that your application is highly available ?
It uses pods which enables replication of your application. If one goes down you will have other replicas still running until it can be fixed/respawned
How does Kubernetes manage pod deployment ?
It uses a manifest written in yaml
Describe the fields used in the kind: Deployment manifest ?
apiVersion: the designated version of the app
kind: the type of Kubernetes object
metadata: name, namespace and label information
spec: replicas, selector, template
How do I get the port with get pods ?
kubectl get pods -o wide -n development
with the -o wide argument
How do I access another pod from within a pod or just check that my application is working when it is not connected to the internet?
I have to know the port the I am the other container is on.
Use a busybox pod, with wget and make a request in the busybox pod to the pod that I want to check
How do you check the logs of a kubernetes pod
kubectl logs {pod}
How to expose your kubernetes pod to the internet
Create service
Control plane is like mission control
API Server: exposes the kubernetes api with kubectl. See it with kubectl api-resources
etcd: saves data about the state of the cluster
scheduler: newly created pods
controler manager: makes sure things are running porperly
cloud controller manager: helps run on clouds
Worker nodes components ?
Worker nodes usual have a min of 3
kubetlet start of pod
kubelet: container runtime interface
kube-proxy: allows communication between pods
flow of apply
What are the 3 ways to deploy kubernetes apps ?
Deployemnt, daemonset and jobs