kubectl api-resources -o name - answer command will list the object types currently
available on the cluster
kubectl describe $object_type $object_name - answerget information about an object's
spec and status
kubectl get pods - answerGets pods currently running (in the default namespace)
kubectl get nodes - answergets all nodes currently running in cluster
kubectl get node $node_name - answerGets name, status, version, etc. about node that
is specified
kubectl get node $node_name -o yaml - answerGets very detailed information about the
node that is specified in yaml information defining the object and it's spec
Pods - answerThe basic building blocks of any application running in kubernetes
Pod - answerConsists of one or more containers and a set of resources shared by those
containers. All containers managed by a Kubernetes cluster are part of a POD
kubecutl create -f mypod.yml - answercreate a pod from the yaml definition file
kubectl apply -f my-pod.yml - answerEdit a pod by updating the yaml definition and
reapplying it
kubectl edit pod my-pod - answerEdit a pod
kubectl delete pod my-pod - answerDelete a pd
kubectl get namespaces - answerYou can get a list of the namespaces in the cluster
kubectl create ns namespace_name - answercommand to create a namespace
namespaces - answervirtual cluster that makes it easier to manage environments with
man users across multiple teams or projects
command: ['echo'] - answerUnder the spec for your container you can specify a
command this way.
, args: [" array", "of", "arguments"] - answerThe command option in specs also takes an
array of arguments (as strings).
- containerPort: 80 - answer Your container may want to network with other containers.
This will require you to specify a port for the container (port 80 in this example).
config maps - answera k8s object that stores configuration data in a key-value format.
This config data can then be used to configure software running in a container, by
referencing the configMap in the pod spec.
kubectl logs pod_name - answerDumps pod logs to STDOUT
kubectl exec my-pod -- ls / - answer Executes a command inside a pod, in this case
"ls /"
resource request - answerthe amount of resources necessary to run a container
resource limit - answerA max value for the resource usage of a container
service accounts - answer allow containers running in pods to access the K8s API.
Some apps may need to interact with the cluser itself. This provides a way to let
kubectl create serviceacccount my-service account - answer Command to create a
service account in K8S
serviceAccountName - answerKey name for naming a service account.
multi-container pod - answer pods with more than one container that al work together as
a single unit. It's typically better to keep them separate, but there are some uses cases
where they can be beneficial.
share Process Namespace: true - answer With the process namespace sharing
enabled, containers in the same pod can interact with and signal one another's
processes.
sidecar pod pattern - answer uses a container that enhances or adds functionality to the
main container in some way. For example, checking if there have been updating in an
external repo and pushing them to the pain container if there have been changes.
ambassador pod pattern - answerUses a container to accept network traffic and pass it
on to the main container. For example, the container listens on a custom port and
forwards the traffic to the main container on it's hard coded port.
adapter pod pattern - answeruses a container to change the output of the main
container in some way (e.g., formats and decorates log output from the main container).
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller Dreamer252. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $14.49. You're not tied to anything after your purchase.