Recap Core Concepts Flashcards
What are parts of the Open Container Initiative?
- imagespec: specifications on how an image should be build
- runtimespec: how any container runtime should be build
What is the tool ‘ctr’?
- CLI
- comes with containerD
- made for debugging containerD
- only supports limited set of features
What is ‘nerdctl’?
- CLI
- provides a Docker-like CLI for containerD
- very similiar to Docker commands
- supports most of the options docker offers
- supports: Lazy Pulling, encrypted container images, …
What is ‘crictl’?
- CLI for CRI compatible container runtimes
- command line utility used to interact with the CRI compatible runtime
- installed separately
- comes from Kubernetes perspective
- works across different runtimes
- used to inspect and debug container runtimes
Name a few ‘crictl’ commands
- crictl
- crictl pull busybox : pulls an image
- crictl images : list existing images
- crictl ps -a : list containers
- crictl exec -i -t 3e024dd50a72.. ls : run a command inside a container, with same options (-i for staying open, even when not attached, -t for allocating a pseudo -tty)
- crictl logs < container-id>
- crictl pods
- crictl inspect …
- crictl attach …
How are endpoints handled with crictl?
- users are encouraged to manually manage endpoints for interaction
- ‘crictl –runtime-endpoint’
- ‘crictl –image-endpoint
- or by setting the environment variables
In a ‘kubectl delete’ command, how do you terminate multiple pods?
- by chaining htem together with space
‘kubectl delete pod new-pod-1 new-pod-2 new-pod-3’
Name a few options for the Output format flag for commands
‘kubectl [command] [TYPE] [NAME] -o < output-format>’
-o json -> JSON formatted API object
-o name -> print only resource name
-o wide -> plain text with additional information
-o yaml -> yaml formatted api object
What is the default namespace and when is it created?
‘Default’-namespace
- created when the cluster is the first time set up
What is the namespace called, that is used for internal purposes, such as thos required by networking solution, DNS service etc
kube-system
- created at cluster-startup
What is the namespace called with resources that should be made available to all users?
kube-public
Which namespaces are created with cluster-startup?
kube-system
default
kube-public
What can be set for namespaces?
- own set of policies, who can do what
- quota of resources, that is allowed to use
How would it be possible to connect a container from one namespace to a container in a different namespace?
- by appending the namespace to the application name
‘db-service’
->
‘db-service.dev.svc.cluster.local’
-> possible, because when service is created, a DNS entry is created automatically in this format
‘cluster.local’ is the default domain name of kubernetes cluster
‘svc’ is subdomain of service
‘dev’ is the namespace
‘db-service’ is the service name
How is a dns-entry for a service name structured?
SERVICE-NAME.NAMESPACE.svc.cluster.local