Question: What are the benefits of kubectl create job?

Answer: kubectl create jobSynopsisCreate a job with the specified name.kubectl create job NAME --image=image [--from=cronjob/name] -- [COMMAND] [args...] Examples # Create a job kubectl create job my-job --image=busybox # Create a job with a command kubectl create job my-job --image=busybox -- date # Create a job from a cron job named "a-cronjob" kubectl create job test-job --from=cronjob/a-cronjob Options--allow-missing-template-keys Default: trueIf true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.--dry-run string[="unchanged"] Default: "none"Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.--field-manager string Default: "kubectl-create"Name of the manager used to track field ownership.--from stringThe name of the resource to create a Job from (only cronjob is supported).-h, --helphelp for job--image stringImage name to run.-o, --output stringOutput format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file).--save-configIf true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.--show-managed-fieldsIf true, keep the managedFields when printing objects in JSON or YAML format.--template stringTemplate string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].--validate string[="strict"] Default: "strict"Must be one of: strict (or true), warn, ignore (or false). "true" or "strict" will use a schema to validate the input and fail the request if invalid. It will perform server side validation if ServerSideFieldValidation is enabled on the api-server, but will fall back to less reliable client-side validation if not. "warn" will warn about unknown or duplicate fields without blocking the request if server-side field validation is enabled on the API server, and behave as "ignore" otherwise. "false" or "ignore" will not perform any schema validation, silently dropping any unknown or duplicate fields.Parent Options Inherited--as stringUsername to impersonate for the operation. User could be a regular user or a service account in a namespace.--as-group stringsGroup to impersonate for the operation, this flag can be repeated to specify multiple groups.--as-uid stringUID to impersonate for the operation.--cache-dir string Default: "$HOME/.kube/cache"Default cache directory--certificate-authority stringPath to a cert file for the certificate authority--client-certificate stringPath to a client certificate file for TLS--client-key stringPath to a client key file for TLS--cluster stringThe name


Question: What is Synopsis?

Answer: C r e a t e   a   j o b   w i t h   t h e   s p e c i f i e d   n a m e .   k u b e c t l   c r e a t e   j o b   N A M E   - - i m a g e = i m a g e   [ - - f r o m = c r o n j o b / n a m e ]   - -   [ C O M M A N D ]   [ a r g s . . . ]


Question: What is Examples?

Answer: #   C r e a t e   a   j o b   k u b e c t l   c r e a t e   j o b   m y - j o b   - - i m a g e = b u s y b o x   #   C r e a t e   a   j o b   w i t h   a   c o m m a n d   k u b e c t l   c r e a t e   j o b   m y - j o b   - - i m a g e = b u s y b o x   - -   d a t e   #   C r e a t e   a   j o b   f r o m   a   c r o n   j o b   n a m e d   " a - c r o n j o b "   k u b e c t l   c r e a t e   j o b   t e s t - j o b   - - f r o m = c r o n j o b / a - c r o n j o b


Question: What is Options?

Answer: I f   t r u e ,   i g n o r e   a n y   e r r o r s   i n   t e m p l a t e s   w h e n   a   f i e l d   o r   m a p   k e y   i s   m i s s i n g   i n   t h e   t e m p l a t e .   O n l y   a p p l i e s   t o   g o l a n g   a n d   j s o n p a t h   o u t p u t   f o r m a t s .   M u s t   b e   " n o n e " ,   " s e r v e r " ,   o r   " c l i e n t " .   I f   c l i e n t   s t r a t e g y ,   o n l y   p r i n t   t h e   o b j e c t   t h a t   w o u l d   b e   s e n t ,   w i t h o u t   s e n d i n g   i t .   I f   s e r v e r   s t r a t e g y ,   s u b m i t   s e r v e r - s i d e   r e q u e s t   w i t h o u t   p e r s i s t i n g   t h e   r e s o u r c e .   N a m e   o f   t h e   m a n a g e r   u s e d   t o   t r a c k   f i e l d   o w n e r s h i p .   T h e   n a m e   o f   t h e   r e s o u r c e   t o   c r e a t e   a   J o b   f r o m   ( o n l y   c r o n j o b   i s   s u p p o r t e d ) .   h e l p   f o r   j o b   I m a g e   n a m e   t o   r u n .   O u t p u t   f o r m a t .   O n e   o f :   ( j s o n ,   y a m l ,   n a m e ,   g o - t e m p l a t e ,   g o - t e m p l a t e - f i l e ,   t e m p l a t e ,   t e m p l a t e f i l e ,   j s o n p a t h ,   j s o n p a t h - a s - j s o n ,   j s o n p a t h - f i l e ) .   I f   t r u e ,   t h e   c o n f i g u r a t i o n   o f   c u r r e n t   o b j e c t   w i l l   b e   s a v e d   i n   i t s   a n n o t a t i o n .   O t h e r w i s e ,   t h e   a n n o t a t i o n   w i l l   b e   u n c h a n g e d .   T h i s   f l a g   i s   u s e f u l   w h e n   y o u   w a n t   t o   p e r f o r m   k u b e c t l   a p p l y   o n   t h i s   o b j e c t   i n   t h e   f u t u r e .   I f   t r u e ,   k e e p   t h e   m a n a g e d F i e l d s   w h e n   p r i n t i n g   o b j e c t s   i n   J S O N   o r   Y A M L   f o r m a t .   T e m p l a t e   s t r i n g   o r   p a t h   t o   t e m p l a t e   f i l e   t o   u s e   w h e n   - o = g o - t e m p l a t


Question: What is Parent Options Inherited?

Answer: U s e r n a m e   t o   i m p e r s o n a t e   f o r   t h e   o p e r a t i o n .   U s e r   c o u l d   b e   a   r e g u l a r   u s e r   o r   a   s e r v i c e   a c c o u n t   i n   a   n a m e s p a c e .   G r o u p   t o   i m p e r s o n a t e   f o r   t h e   o p e r a t i o n ,   t h i s   f l a g   c a n   b e   r e p e a t e d   t o   s p e c i f y   m u l t i p l e   g r o u p s .   U I D   t o   i m p e r s o n a t e   f o r   t h e   o p e r a t i o n .   D e f a u l t   c a c h e   d i r e c t o r y   P a t h   t o   a   c e r t   f i l e   f o r   t h e   c e r t i f i c a t e   a u t h o r i t y   P a t h   t o   a   c l i e n t   c e r t i f i c a t e   f i l e   f o r   T L S   P a t h   t o   a   c l i e n t   k e y   f i l e   f o r   T L S   T h e   n a m e   o f   t h e   k u b e c o n f i g   c l u s t e r   t o   u s e   T h e   n a m e   o f   t h e   k u b e c o n f i g   c o n t e x t   t o   u s e   I f   t r u e ,   o p t - o u t   o f   r e s p o n s e   c o m p r e s s i o n   f o r   a l l   r e q u e s t s   t o   t h e   s e r v e r   I f   t r u e ,   t h e   s e r v e r ' s   c e r t i f i c a t e   w i l l   n o t   b e   c h e c k e d   f o r   v a l i d i t y .   T h i s   w i l l   m a k e   y o u r   H T T P S   c o n n e c t i o n s   i n s e c u r e   P a t h   t o   t h e   k u b e c o n f i g   f i l e   t o   u s e   f o r   C L I   r e q u e s t s .   P a t h   t o   t h e   k u b e r c   f i l e   t o   u s e   f o r   p r e f e r e n c e s .   T h i s   c a n   b e   d i s a b l e d   b y   e x p o r t i n g   K U B E C T L _ K U B E R C = f a l s e   f e a t u r e   g a t e   o r   t u r n i n g   o f f   t h e   f e a t u r e   K U B E R C = o f f .   R e q u i r e   s e r v e r   v e r s i o n   t o   m a t c h   c l i e n t   v e r s i o n   I f   p r e s e n t ,   t h e   n a m e s p a c e   s c o p e   f o r   t h i s   C L I   r e q u e s t   P a s s w o r d   f o r   b a s i c   a u t h e n t i c a t


Question: What is See Also?

Answer: k u b e c t l   c r e a t e   -   C r e a t e   a   r e s o u r c e   f r o m   a   f i l e   o r   f r o m   s t d i n   T h i s   p a g e   i s   a u t o m a t i c a l l y   g e n e r a t e d .   I f   y o u   p l a n   t o   r e p o r t   a n   i s s u e   w i t h   t h i s   p a g e ,   m e n t i o n   t h a t   t h e   p a g e   i s   a u t o - g e n e r a t e d   i n   y o u r   i s s u e   d e s c r i p t i o n .   T h e   f i x   m a y   n e e d   t o   h a p p e n   e l s e w h e r e   i n   t h e   K u b e r n e t e s   p r o j e c t .


Question: What is Metrics for Kubernetes Object States?

Answer: Metrics for Kubernetes Object Stateskube-state-metrics, an add-on agent to generate and expose cluster-level metrics.The state of Kubernetes objects in the Kubernetes API can be exposed as metrics. An add-on agent called kube-state-metrics can connect to the Kubernetes API server and expose a HTTP endpoint with metrics generated from the state of individual objects in the cluster. It exposes various information about the state of objects like labels and annotations, startup and termination times, status or the phase the object currently is in. For example, containers running in pods create a kube_pod_container_info metric. This includes the name of the container, the name of the pod it is part of, the namespace the pod is running in, the name of the container image, the ID of the image, the image name from the spec of the container, the ID of the running container and the ID of the pod as labels.🛇 This item links to a third party project or product that is not part of Kubernetes itself. More informationAn external component that is able and capable to scrape the endpoint of kube-state-metrics (for example via Prometheus) can now be used to enable the following use cases.Example: using metrics from kube-state-metrics to query the cluster stateMetric series generated by kube-state-metrics are helpful to gather further insights into the cluster, as they can be used for querying.If you use Prometheus or another tool that uses the same query language, the following PromQL query returns the number of pods that are not ready:count(kube_pod_status_ready{condition="false"}) by (namespace, pod) Example: alerting based on from kube-state-metricsMetrics generated from kube-state-metrics also allow for alerting on issues in the cluster.If you use Prometheus or a similar tool that uses the same alert rule language, the following alert will fire if there are pods that have been in a Terminating state for more than 5 minutes:groups: - name: Pod state rules: - alert: PodsBlockedInTerminatingState expr: count(kube_pod_deletion_timestamp) by (namespace, pod) * count(kube_pod_status_reason{reason="NodeLost"} == 0) by (namespace, pod) > 0 for: 5m labels: severity: page annotations: summary: Pod {{$labels.namespace}}/{{$labels.pod}} blocked in Terminating state. Items on this page refer to third party products or projects that provide functionality required by Kubernetes. The Kubernetes project authors aren't responsible for those third-party products or projects. See the CNCF website guidelines for more details.You should read the content guide before proposing a change that adds an extra third-party link.


Question: How does Metrics for Kubernetes Object States work?

Answer: Metrics for Kubernetes Object Stateskube-state-metrics, an add-on agent to generate and expose cluster-level metrics.The state of Kubernetes objects in the Kubernetes API can be exposed as metrics. An add-on agent called kube-state-metrics can connect to the Kubernetes API server and expose a HTTP endpoint with metrics generated from the state of individual objects in the cluster. It exposes various information about the state of objects like labels and annotations, startup and termination times, status or the phase the object currently is in. For example, containers running in pods create a kube_pod_container_info metric. This includes the name of the container, the name of the pod it is part of, the namespace the pod is running in, the name of the container image, the ID of the image, the image name from the spec of the container, the ID of the running container and the ID of the pod as labels.🛇 This item links to a third party project or product that is not part of Kubernetes itself. More informationAn external component that is able and capable to scrape the endpoint of kube-state-metrics (for example via Prometheus) can now be used to enable the following use cases.Example: using metrics from kube-state-metrics to query the cluster stateMetric series generated by kube-state-metrics are helpful to gather further insights into the cluster, as they can be used for querying.If you use Prometheus or another tool that uses the same query language, the following PromQL query returns the number of pods that are not ready:count(kube_pod_status_ready{condition="false"}) by (namespace, pod) Example: alerting based on from kube-state-metricsMetrics generated from kube-state-metrics also allow for alerting on issues in the cluster.If you use Prometheus or a similar tool that uses the same alert rule language, the following alert will fire if there are pods that have been in a Terminating state for more than 5 minutes:groups: - name: Pod state rules: - alert: PodsBlockedInTerminatingState expr: count(kube_pod_deletion_timestamp) by (namespace, pod) * count(kube_pod_status_reason{reason="NodeLost"} == 0) by (namespace, pod) > 0 for: 5m labels: severity: page annotations: summary: Pod {{$labels.namespace}}/{{$labels.pod}} blocked in Terminating state. Items on this page refer to third party products or projects that provide functionality required by Kubernetes. The Kubernetes project authors aren't responsible for those third-party products or projects. See the CNCF website guidelines for more details.You should read the content guide before proposing a change that adds an extra third-party link.


Question: When would you use Metrics for Kubernetes Object States?

Answer: Metrics for Kubernetes Object Stateskube-state-metrics, an add-on agent to generate and expose cluster-level metrics.The state of Kubernetes objects in the Kubernetes API can be exposed as metrics. An add-on agent called kube-state-metrics can connect to the Kubernetes API server and expose a HTTP endpoint with metrics generated from the state of individual objects in the cluster. It exposes various information about the state of objects like labels and annotations, startup and termination times, status or the phase the object currently is in. For example, containers running in pods create a kube_pod_container_info metric. This includes the name of the container, the name of the pod it is part of, the namespace the pod is running in, the name of the container image, the ID of the image, the image name from the spec of the container, the ID of the running container and the ID of the pod as labels.🛇 This item links to a third party project or product that is not part of Kubernetes itself. More informationAn external component that is able and capable to scrape the endpoint of kube-state-metrics (for example via Prometheus) can now be used to enable the following use cases.Example: using metrics from kube-state-metrics to query the cluster stateMetric series generated by kube-state-metrics are helpful to gather further insights into the cluster, as they can be used for querying.If you use Prometheus or another tool that uses the same query language, the following PromQL query returns the number of pods that are not ready:count(kube_pod_status_ready{condition="false"}) by (namespace, pod) Example: alerting based on from kube-state-metricsMetrics generated from kube-state-metrics also allow for alerting on issues in the cluster.If you use Prometheus or a similar tool that uses the same alert rule language, the following alert will fire if there are pods that have been in a Terminating state for more than 5 minutes:groups: - name: Pod state rules: - alert: PodsBlockedInTerminatingState expr: count(kube_pod_deletion_timestamp) by (namespace, pod) * count(kube_pod_status_reason{reason="NodeLost"} == 0) by (namespace, pod) > 0 for: 5m labels: severity: page annotations: summary: Pod {{$labels.namespace}}/{{$labels.pod}} blocked in Terminating state. Items on this page refer to third party products or projects that provide functionality required by Kubernetes. The Kubernetes project authors aren't responsible for those third-party products or projects. See the CNCF website guidelines for more details.You should read the content guide before proposing a change that adds an extra third-party link.


Question: What are the benefits of Metrics for Kubernetes Object States?

Answer: Metrics for Kubernetes Object Stateskube-state-metrics, an add-on agent to generate and expose cluster-level metrics.The state of Kubernetes objects in the Kubernetes API can be exposed as metrics. An add-on agent called kube-state-metrics can connect to the Kubernetes API server and expose a HTTP endpoint with metrics generated from the state of individual objects in the cluster. It exposes various information about the state of objects like labels and annotations, startup and termination times, status or the phase the object currently is in. For example, containers running in pods create a kube_pod_container_info metric. This includes the name of the container, the name of the pod it is part of, the namespace the pod is running in, the name of the container image, the ID of the image, the image name from the spec of the container, the ID of the running container and the ID of the pod as labels.🛇 This item links to a third party project or product that is not part of Kubernetes itself. More informationAn external component that is able and capable to scrape the endpoint of kube-state-metrics (for example via Prometheus) can now be used to enable the following use cases.Example: using metrics from kube-state-metrics to query the cluster stateMetric series generated by kube-state-metrics are helpful to gather further insights into the cluster, as they can be used for querying.If you use Prometheus or another tool that uses the same query language, the following PromQL query returns the number of pods that are not ready:count(kube_pod_status_ready{condition="false"}) by (namespace, pod) Example: alerting based on from kube-state-metricsMetrics generated from kube-state-metrics also allow for alerting on issues in the cluster.If you use Prometheus or a similar tool that uses the same alert rule language, the following alert will fire if there are pods that have been in a Terminating state for more than 5 minutes:groups: - name: Pod state rules: - alert: PodsBlockedInTerminatingState expr: count(kube_pod_deletion_timestamp) by (namespace, pod) * count(kube_pod_status_reason{reason="NodeLost"} == 0) by (namespace, pod) > 0 for: 5m labels: severity: page annotations: summary: Pod {{$labels.namespace}}/{{$labels.pod}} blocked in Terminating state. Items on this page refer to third party products or projects that provide functionality required by Kubernetes. The Kubernetes project authors aren't responsible for those third-party products or projects. See the CNCF website guidelines for more details.You should read the content guide before proposing a change that adds an extra third-party link.


Question: What is Metrics for Kubernetes Object States?

Answer: T h e   s t a t e   o f   K u b e r n e t e s   o b j e c t s   i n   t h e   K u b e r n e t e s   A P I   c a n   b e   e x p o s e d   a s   m e t r i c s .   A n   a d d - o n   a g e n t   c a l l e d   k u b e - s t a t e - m e t r i c s   c a n   c o n n e c t   t o   t h e   K u b e r n e t e s   A P I   s e r v e r   a n d   e x p o s e   a   H T T P   e n d p o i n t   w i t h   m e t r i c s   g e n e r a t e d   f r o m   t h e   s t a t e   o f   i n d i v i d u a l   o b j e c t s   i n   t h e   c l u s t e r .   I t   e x p o s e s   v a r i o u s   i n f o r m a t i o n   a b o u t   t h e   s t a t e   o f   o b j e c t s   l i k e   l a b e l s   a n d   a n n o t a t i o n s ,   s t a r t u p   a n d   t e r m i n a t i o n   t i m e s ,   s t a t u s   o r   t h e   p h a s e   t h e   o b j e c t   c u r r e n t l y   i s   i n .   F o r   e x a m p l e ,   c o n t a i n e r s   r u n n i n g   i n   p o d s   c r e a t e   a   k u b e _ p o d _ c o n t a i n e r _ i n f o   m e t r i c .   T h i s   i n c l u d e s   t h e   n a m e   o f   t h e   c o n t a i n e r ,   t h e   n a m e   o f   t h e   p o d   i t   i s   p a r t   o f ,   t h e   n a m e s p a c e   t h e   p o d   i s   r u n n i n g   i n ,   t h e   n a m e   o f   t h e   c o n t a i n e r   i m a g e ,   t h e   I D   o f   t h e   i m a g e ,   t h e   i m a g e   n a m e   f r o m   t h e   s p e c   o f   t h e   c o n t a i n e r ,   t h e   I D   o f   t h e   r u n n i n g   c o n t a i n e r   a n d   t h e   I D   o f   t h e   p o d   a s   l a b e l s .   A n   e x t e r n a l   c o m p o n e n t   t h a t   i s   a b l e   a n d   c a p a b l e   t o   s c r a p e   t h e   e n d p o i n t   o f   k u b e - s t a t e - m e t r i c s   ( f o r   e x a m p l e   v i a   P r o m e t h e u s )   c a n   n o w   b e   u s e d   t o   e n a b l e   t h e   f o l l o w i n g   u s e   c a s e s .


Question: What is Example: using metrics from kube-state-metrics to query the cluster state?

Answer: M e t r i c   s e r i e s   g e n e r a t e d   b y   k u b e - s t a t e - m e t r i c s   a r e   h e l p f u l   t o   g a t h e r   f u r t h e r   i n s i g h t s   i n t o   t h e   c l u s t e r ,   a s   t h e y   c a n   b e   u s e d   f o r   q u e r y i n g .   I f   y o u   u s e   P r o m e t h e u s   o r   a n o t h e r   t o o l   t h a t   u s e s   t h e   s a m e   q u e r y   l a n g u a g e ,   t h e   f o l l o w i n g   P r o m Q L   q u e r y   r e t u r n s   t h e   n u m b e r   o f   p o d s   t h a t   a r e   n o t   r e a d y :   c o u n t ( k u b e _ p o d _ s t a t u s _ r e a d y { c o n d i t i o n = " f a l s e " } )   b y   ( n a m e s p a c e ,   p o d )


Question: What is Example: alerting based on from kube-state-metrics?

Answer: M e t r i c s   g e n e r a t e d   f r o m   k u b e - s t a t e - m e t r i c s   a l s o   a l l o w   f o r   a l e r t i n g   o n   i s s u e s   i n   t h e   c l u s t e r .   I f   y o u   u s e   P r o m e t h e u s   o r   a   s i m i l a r   t o o l   t h a t   u s e s   t h e   s a m e   a l e r t   r u l e   l a n g u a g e ,   t h e   f o l l o w i n g   a l e r t   w i l l   f i r e   i f   t h e r e   a r e   p o d s   t h a t   h a v e   b e e n   i n   a   T e r m i n a t i n g   s t a t e   f o r   m o r e   t h a n   5   m i n u t e s :   g r o u p s :   -   n a m e :   P o d   s t a t e   r u l e s :   -   a l e r t :   P o d s B l o c k e d I n T e r m i n a t i n g S t a t e   e x p r :   c o u n t ( k u b e _ p o d _ d e l e t i o n _ t i m e s t a m p )   b y   ( n a m e s p a c e ,   p o d )   *   c o u n t ( k u b e _ p o d _ s t a t u s _ r e a s o n { r e a s o n = " N o d e L o s t " }   = =   0 )   b y   ( n a m e s p a c e ,   p o d )   >   0   f o r :   5 m   l a b e l s :   s e v e r i t y :   p a g e   a n n o t a t i o n s :   s u m m a r y :   P o d   { { $ l a b e l s . n a m e s p a c e } } / { { $ l a b e l s . p o d } }   b l o c k e d   i n   T e r m i n a t i n g   s t a t e .   I t e m s   o n   t h i s   p a g e   r e f e r   t o   t h i r d   p a r t y   p r o d u c t s   o r   p r o j e c t s   t h a t   p r o v i d e   f u n c t i o n a l i t y   r e q u i r e d   b y   K u b e r n e t e s .   T h e   K u b e r n e t e s   p r o j e c t   a u t h o r s   a r e n ' t   r e s p o n s i b l e   f o r   t h o s e   t h i r d - p a r t y   p r o d u c t s   o r   p r o j e c t s .   S e e   t h e   C N C F   w e b s i t e   g u i d e l i n e s   f o r   m o r e   d e t a i l s .   Y o u   s h o u l d   r e a d   t h e   c o n t e n t   g u i d e   b e f o r e   p r o p o s i n g   a   c h a n g e   t h a t   a d d s   a n   e x t r a   t h i r d - p a r t y   l i n k .


Question: What is Authorization?

Answer: AuthorizationDetails of Kubernetes authorization mechanisms and supported authorization modes.Kubernetes authorization takes place following authentication. Usually, a client making a request must be authenticated (logged in) before its request can be allowed; however, Kubernetes also allows anonymous requests in some circumstances.For an overview of how authorization fits into the wider context of API access control, read Controlling Access to the Kubernetes API.Authorization verdictsKubernetes authorization of API requests takes place within the API server. The API server evaluates all of the request attributes against all policies, potentially also consulting external services, and then allows or denies the request.All parts of an API request must be allowed by some authorization mechanism in order to proceed. In other words: access is denied by default.Note:Access controls and policies that depend on specific fields of specific kinds of objects are handled by admission controllers.Kubernetes admission control happens after authorization has completed (and, therefore, only when the authorization decision was to allow the request).When multiple authorization modules are configured, each is checked in sequence. If any authorizer approves or denies a request, that decision is immediately returned and no other authorizer is consulted. If all modules have no opinion on the request, then the request is denied. An overall deny verdict means that the API server rejects the request and responds with an HTTP 403 (Forbidden) status.Request attributes used in authorizationKubernetes reviews only the following API request attributes:user - The user string provided during authentication.group - The list of group names to which the authenticated user belongs.extra - A map of arbitrary string keys to string values, provided by the authentication layer.API - Indicates whether the request is for an API resource.Request path - Path to miscellaneous non-resource endpoints like /api or /healthz.API request verb - API verbs like get, list, create, update, patch, watch, delete, and deletecollection are used for resource requests. To determine the request verb for a resource API endpoint, see request verbs and authorization.HTTP request verb - Lowercased HTTP methods like get, post, put, and delete are used for non-resource requests.Resource - The ID or name of the resource that is being accessed (for resource requests only) -- For resource requests using get, update, patch, and delete verbs, you must provide the resource name.Subresource - The subresource that is being accessed (for resource requests only).Namespace - The namespace of the object that is being accessed (for namespaced resource requests only).API group - The API Group being accessed (for resource requests only). An empty string designates the core API group.Request verbs and authorizationNon-resource requestsRequests to endpoints other than /api/v1/... or /apis/<group>/<version>/... are considered non


Question: How does Authorization work?

Answer: AuthorizationDetails of Kubernetes authorization mechanisms and supported authorization modes.Kubernetes authorization takes place following authentication. Usually, a client making a request must be authenticated (logged in) before its request can be allowed; however, Kubernetes also allows anonymous requests in some circumstances.For an overview of how authorization fits into the wider context of API access control, read Controlling Access to the Kubernetes API.Authorization verdictsKubernetes authorization of API requests takes place within the API server. The API server evaluates all of the request attributes against all policies, potentially also consulting external services, and then allows or denies the request.All parts of an API request must be allowed by some authorization mechanism in order to proceed. In other words: access is denied by default.Note:Access controls and policies that depend on specific fields of specific kinds of objects are handled by admission controllers.Kubernetes admission control happens after authorization has completed (and, therefore, only when the authorization decision was to allow the request).When multiple authorization modules are configured, each is checked in sequence. If any authorizer approves or denies a request, that decision is immediately returned and no other authorizer is consulted. If all modules have no opinion on the request, then the request is denied. An overall deny verdict means that the API server rejects the request and responds with an HTTP 403 (Forbidden) status.Request attributes used in authorizationKubernetes reviews only the following API request attributes:user - The user string provided during authentication.group - The list of group names to which the authenticated user belongs.extra - A map of arbitrary string keys to string values, provided by the authentication layer.API - Indicates whether the request is for an API resource.Request path - Path to miscellaneous non-resource endpoints like /api or /healthz.API request verb - API verbs like get, list, create, update, patch, watch, delete, and deletecollection are used for resource requests. To determine the request verb for a resource API endpoint, see request verbs and authorization.HTTP request verb - Lowercased HTTP methods like get, post, put, and delete are used for non-resource requests.Resource - The ID or name of the resource that is being accessed (for resource requests only) -- For resource requests using get, update, patch, and delete verbs, you must provide the resource name.Subresource - The subresource that is being accessed (for resource requests only).Namespace - The namespace of the object that is being accessed (for namespaced resource requests only).API group - The API Group being accessed (for resource requests only). An empty string designates the core API group.Request verbs and authorizationNon-resource requestsRequests to endpoints other than /api/v1/... or /apis/<group>/<version>/... are considered non


Question: When would you use Authorization?

Answer: AuthorizationDetails of Kubernetes authorization mechanisms and supported authorization modes.Kubernetes authorization takes place following authentication. Usually, a client making a request must be authenticated (logged in) before its request can be allowed; however, Kubernetes also allows anonymous requests in some circumstances.For an overview of how authorization fits into the wider context of API access control, read Controlling Access to the Kubernetes API.Authorization verdictsKubernetes authorization of API requests takes place within the API server. The API server evaluates all of the request attributes against all policies, potentially also consulting external services, and then allows or denies the request.All parts of an API request must be allowed by some authorization mechanism in order to proceed. In other words: access is denied by default.Note:Access controls and policies that depend on specific fields of specific kinds of objects are handled by admission controllers.Kubernetes admission control happens after authorization has completed (and, therefore, only when the authorization decision was to allow the request).When multiple authorization modules are configured, each is checked in sequence. If any authorizer approves or denies a request, that decision is immediately returned and no other authorizer is consulted. If all modules have no opinion on the request, then the request is denied. An overall deny verdict means that the API server rejects the request and responds with an HTTP 403 (Forbidden) status.Request attributes used in authorizationKubernetes reviews only the following API request attributes:user - The user string provided during authentication.group - The list of group names to which the authenticated user belongs.extra - A map of arbitrary string keys to string values, provided by the authentication layer.API - Indicates whether the request is for an API resource.Request path - Path to miscellaneous non-resource endpoints like /api or /healthz.API request verb - API verbs like get, list, create, update, patch, watch, delete, and deletecollection are used for resource requests. To determine the request verb for a resource API endpoint, see request verbs and authorization.HTTP request verb - Lowercased HTTP methods like get, post, put, and delete are used for non-resource requests.Resource - The ID or name of the resource that is being accessed (for resource requests only) -- For resource requests using get, update, patch, and delete verbs, you must provide the resource name.Subresource - The subresource that is being accessed (for resource requests only).Namespace - The namespace of the object that is being accessed (for namespaced resource requests only).API group - The API Group being accessed (for resource requests only). An empty string designates the core API group.Request verbs and authorizationNon-resource requestsRequests to endpoints other than /api/v1/... or /apis/<group>/<version>/... are considered non


Question: What are the benefits of Authorization?

Answer: AuthorizationDetails of Kubernetes authorization mechanisms and supported authorization modes.Kubernetes authorization takes place following authentication. Usually, a client making a request must be authenticated (logged in) before its request can be allowed; however, Kubernetes also allows anonymous requests in some circumstances.For an overview of how authorization fits into the wider context of API access control, read Controlling Access to the Kubernetes API.Authorization verdictsKubernetes authorization of API requests takes place within the API server. The API server evaluates all of the request attributes against all policies, potentially also consulting external services, and then allows or denies the request.All parts of an API request must be allowed by some authorization mechanism in order to proceed. In other words: access is denied by default.Note:Access controls and policies that depend on specific fields of specific kinds of objects are handled by admission controllers.Kubernetes admission control happens after authorization has completed (and, therefore, only when the authorization decision was to allow the request).When multiple authorization modules are configured, each is checked in sequence. If any authorizer approves or denies a request, that decision is immediately returned and no other authorizer is consulted. If all modules have no opinion on the request, then the request is denied. An overall deny verdict means that the API server rejects the request and responds with an HTTP 403 (Forbidden) status.Request attributes used in authorizationKubernetes reviews only the following API request attributes:user - The user string provided during authentication.group - The list of group names to which the authenticated user belongs.extra - A map of arbitrary string keys to string values, provided by the authentication layer.API - Indicates whether the request is for an API resource.Request path - Path to miscellaneous non-resource endpoints like /api or /healthz.API request verb - API verbs like get, list, create, update, patch, watch, delete, and deletecollection are used for resource requests. To determine the request verb for a resource API endpoint, see request verbs and authorization.HTTP request verb - Lowercased HTTP methods like get, post, put, and delete are used for non-resource requests.Resource - The ID or name of the resource that is being accessed (for resource requests only) -- For resource requests using get, update, patch, and delete verbs, you must provide the resource name.Subresource - The subresource that is being accessed (for resource requests only).Namespace - The namespace of the object that is being accessed (for namespaced resource requests only).API group - The API Group being accessed (for resource requests only). An empty string designates the core API group.Request verbs and authorizationNon-resource requestsRequests to endpoints other than /api/v1/... or /apis/<group>/<version>/... are considered non


Question: What is Authorization?

Answer: K u b e r n e t e s   a u t h o r i z a t i o n   t a k e s   p l a c e   f o l l o w i n g   a u t h e n t i c a t i o n .   U s u a l l y ,   a   c l i e n t   m a k i n g   a   r e q u e s t   m u s t   b e   a u t h e n t i c a t e d   ( l o g g e d   i n )   b e f o r e   i t s   r e q u e s t   c a n   b e   a l l o w e d ;   h o w e v e r ,   K u b e r n e t e s   a l s o   a l l o w s   a n o n y m o u s   r e q u e s t s   i n   s o m e   c i r c u m s t a n c e s .   F o r   a n   o v e r v i e w   o f   h o w   a u t h o r i z a t i o n   f i t s   i n t o   t h e   w i d e r   c o n t e x t   o f   A P I   a c c e s s   c o n t r o l ,   r e a d   C o n t r o l l i n g   A c c e s s   t o   t h e   K u b e r n e t e s   A P I .


Question: What is Authorization verdicts?

Answer: K u b e r n e t e s   a u t h o r i z a t i o n   o f   A P I   r e q u e s t s   t a k e s   p l a c e   w i t h i n   t h e   A P I   s e r v e r .   T h e   A P I   s e r v e r   e v a l u a t e s   a l l   o f   t h e   r e q u e s t   a t t r i b u t e s   a g a i n s t   a l l   p o l i c i e s ,   p o t e n t i a l l y   a l s o   c o n s u l t i n g   e x t e r n a l   s e r v i c e s ,   a n d   t h e n   a l l o w s   o r   d e n i e s   t h e   r e q u e s t .   A l l   p a r t s   o f   a n   A P I   r e q u e s t   m u s t   b e   a l l o w e d   b y   s o m e   a u t h o r i z a t i o n   m e c h a n i s m   i n   o r d e r   t o   p r o c e e d .   I n   o t h e r   w o r d s :   a c c e s s   i s   d e n i e d   b y   d e f a u l t .


Question: What is Note:?

Answer: A c c e s s   c o n t r o l s   a n d   p o l i c i e s   t h a t   d e p e n d   o n   s p e c i f i c   f i e l d s   o f   s p e c i f i c   k i n d s   o f   o b j e c t s   a r e   h a n d l e d   b y   a d m i s s i o n   c o n t r o l l e r s .   K u b e r n e t e s   a d m i s s i o n   c o n t r o l   h a p p e n s   a f t e r   a u t h o r i z a t i o n   h a s   c o m p l e t e d   ( a n d ,   t h e r e f o r e ,   o n l y   w h e n   t h e   a u t h o r i z a t i o n   d e c i s i o n   w a s   t o   a l l o w   t h e   r e q u e s t ) .   W h e n   m u l t i p l e   a u t h o r i z a t i o n   m o d u l e s   a r e   c o n f i g u r e d ,   e a c h   i s   c h e c k e d   i n   s e q u e n c e .   I f   a n y   a u t h o r i z e r   a p p r o v e s   o r   d e n i e s   a   r e q u e s t ,   t h a t   d e c i s i o n   i s   i m m e d i a t e l y   r e t u r n e d   a n d   n o   o t h e r   a u t h o r i z e r   i s   c o n s u l t e d .   I f   a l l   m o d u l e s   h a v e   n o   o p i n i o n   o n   t h e   r e q u e s t ,   t h e n   t h e   r e q u e s t   i s   d e n i e d .   A n   o v e r a l l   d e n y   v e r d i c t   m e a n s   t h a t   t h e   A P I   s e r v e r   r e j e c t s   t h e   r e q u e s t   a n d   r e s p o n d s   w i t h   a n   H T T P   4 0 3   ( F o r b i d d e n )   s t a t u s .


Question: What is Request attributes used in authorization?

Answer: K u b e r n e t e s   r e v i e w s   o n l y   t h e   f o l l o w i n g   A P I   r e q u e s t   a t t r i b u t e s :   u s e r   -   T h e   u s e r   s t r i n g   p r o v i d e d   d u r i n g   a u t h e n t i c a t i o n . g r o u p   -   T h e   l i s t   o f   g r o u p   n a m e s   t o   w h i c h   t h e   a u t h e n t i c a t e d   u s e r   b e l o n g s . e x t r a   -   A   m a p   o f   a r b i t r a r y   s t r i n g   k e y s   t o   s t r i n g   v a l u e s ,   p r o v i d e d   b y   t h e   a u t h e n t i c a t i o n   l a y e r . A P I   -   I n d i c a t e s   w h e t h e r   t h e   r e q u e s t   i s   f o r   a n   A P I   r e s o u r c e . R e q u e s t   p a t h   -   P a t h   t o   m i s c e l l a n e o u s   n o n - r e s o u r c e   e n d p o i n t s   l i k e   / a p i   o r   / h e a l t h z . A P I   r e q u e s t   v e r b   -   A P I   v e r b s   l i k e   g e t ,   l i s t ,   c r e a t e ,   u p d a t e ,   p a t c h ,   w a t c h ,   d e l e t e ,   a n d   d e l e t e c o l l e c t i o n   a r e   u s e d   f o r   r e s o u r c e   r e q u e s t s .   T o   d e t e r m i n e   t h e   r e q u e s t   v e r b   f o r   a   r e s o u r c e   A P I   e n d p o i n t ,   s e e   r e q u e s t   v e r b s   a n d   a u t h o r i z a t i o n . H T T P   r e q u e s t   v e r b   -   L o w e r c a s e d   H T T P   m e t h o d s   l i k e   g e t ,   p o s t ,   p u t ,   a n d   d e l e t e   a r e   u s e d   f o r   n o n - r e s o u r c e   r e q u e s t s . R e s o u r c e   -   T h e   I D   o r   n a m e   o f   t h e   r e s o u r c e   t h a t   i s   b e i n g   a c c e s s e d   ( f o r   r e s o u r c e   r e q u e s t s   o n l y )   - -   F o r   r e s o u r c e   r e q u e s t s   u s i n g   g e t ,   u p d a t e ,   p a t c h ,   a n d   d e l e t e   v e r b s ,   y o u   m u s t   p r o v i d e   t h e   r e s o u r c e   n a m e . S u b r e s o u r c e   -   T h e   s u b r e s o u r c e   t h a t   i s


Question: What is Non-resource requests?

Answer: R e q u e s t s   t o   e n d p o i n t s   o t h e r   t h a n   / a p i / v 1 / . . .   o r   / a p i s / < g r o u p > / < v e r s i o n > / . . .   a r e   c o n s i d e r e d   n o n - r e s o u r c e   r e q u e s t s ,   a n d   u s e   t h e   l o w e r - c a s e d   H T T P   m e t h o d   o f   t h e   r e q u e s t   a s   t h e   v e r b .   F o r   e x a m p l e ,   m a k i n g   a   G E T   r e q u e s t   u s i n g   H T T P   t o   e n d p o i n t s   s u c h   a s   / a p i   o r   / h e a l t h z   w o u l d   u s e   g e t   a s   t h e   v e r b .


Question: What is Resource requests?

Answer: T o   d e t e r m i n e   t h e   r e q u e s t   v e r b   f o r   a   r e s o u r c e   A P I   e n d p o i n t ,   K u b e r n e t e s   m a p s   t h e   H T T P   v e r b   u s e d   a n d   c o n s i d e r s   w h e t h e r   o r   n o t   t h e   r e q u e s t   a c t s   o n   a n   i n d i v i d u a l   r e s o u r c e   o r   o n   a   c o l l e c t i o n   o f   r e s o u r c e s :


Question: What is Caution:?

Answer: K u b e r n e t e s   s o m e t i m e s   c h e c k s   a u t h o r i z a t i o n   f o r   a d d i t i o n a l   p e r m i s s i o n s   u s i n g   s p e c i a l i z e d   v e r b s .   F o r   e x a m p l e :   S p e c i a l   c a s e s   o f   a u t h e n t i c a t i o n i m p e r s o n a t e   v e r b   o n   u s e r s ,   g r o u p s ,   a n d   s e r v i c e a c c o u n t s   i n   t h e   c o r e   A P I   g r o u p ,   a n d   t h e   u s e r e x t r a s   i n   t h e   a u t h e n t i c a t i o n . k 8 s . i o   A P I   g r o u p . A u t h o r i z a t i o n   o f   C e r t i f i c a t e S i g n i n g R e q u e s t s a p p r o v e   v e r b   f o r   C e r t i f i c a t e S i g n i n g R e q u e s t s ,   a n d   u p d a t e   f o r   r e v i s i o n s   t o   e x i s t i n g   a p p r o v a l s R B A C b i n d   a n d   e s c a l a t e   v e r b s   o n   r o l e s   a n d   c l u s t e r r o l e s   r e s o u r c e s   i n   t h e   r b a c . a u t h o r i z a t i o n . k 8 s . i o   A P I   g r o u p .   i m p e r s o n a t e   v e r b   o n   u s e r s ,   g r o u p s ,   a n d   s e r v i c e a c c o u n t s   i n   t h e   c o r e   A P I   g r o u p ,   a n d   t h e   u s e r e x t r a s   i n   t h e   a u t h e n t i c a t i o n . k 8 s . i o   A P I   g r o u p .   a p p r o v e   v e r b   f o r   C e r t i f i c a t e S i g n i n g R e q u e s t s ,   a n d   u p d a t e   f o r   r e v i s i o n s   t o   e x i s t i n g   a p p r o v a l s   b i n d   a n d   e s c a l a t e   v e r b s   o n   r o l e s   a n d   c l u s t e r r o l e s   r e s o u r c e s   i n   t h e   r b a c . a u t h o r i z a t i o n . k 8 s . i o   A P I   g r o u p .


Question: What is Authorization context?

Answer: K u b e r n e t e s   e x p e c t s   a t t r i b u t e s   t h a t   a r e   c o m m o n   t o   R E S T   A P I   r e q u e s t s .   T h i s   m e a n s   t h a t   K u b e r n e t e s   a u t h o r i z a t i o n   w o r k s   w i t h   e x i s t i n g   o r g a n i z a t i o n - w i d e   o r   c l o u d - p r o v i d e r - w i d e   a c c e s s   c o n t r o l   s y s t e m s   w h i c h   m a y   h a n d l e   o t h e r   A P I s   b e s i d e s   t h e   K u b e r n e t e s   A P I .


Question: What is Authorization modes?

Answer: T h e   K u b e r n e t e s   A P I   s e r v e r   m a y   a u t h o r i z e   a   r e q u e s t   u s i n g   o n e   o f   s e v e r a l   a u t h o r i z a t i o n   m o d e s :


Question: What is Warning:?

Answer: E n a b l i n g   t h e   A l w a y s A l l o w   m o d e   b y p a s s e s   a u t h o r i z a t i o n ;   d o   n o t   u s e   t h i s   o n   a   c l u s t e r   w h e r e   y o u   d o   n o t   t r u s t   a l l   p o t e n t i a l   A P I   c l i e n t s ,   i n c l u d i n g   t h e   w o r k l o a d s   t h a t   y o u   r u n .   A u t h o r i z a t i o n   m e c h a n i s m s   t y p i c a l l y   r e t u r n   e i t h e r   a   d e n y   o r   n o   o p i n i o n   r e s u l t ;   s e e   a u t h o r i z a t i o n   v e r d i c t s   f o r   m o r e   o n   t h i s .   A c t i v a t i n g   t h e   A l w a y s A l l o w   m e a n s   t h a t   i f   a l l   o t h e r   a u t h o r i z e r s   r e t u r n   “ n o   o p i n i o n ” ,   t h e   r e q u e s t   i s   a l l o w e d .   F o r   e x a m p l e ,   - - a u t h o r i z a t i o n - m o d e = A l w a y s A l l o w , R B A C   h a s   t h e   s a m e   e f f e c t   a s   - - a u t h o r i z a t i o n - m o d e = A l w a y s A l l o w   b e c a u s e   K u b e r n e t e s   R B A C   d o e s   n o t   p r o v i d e   n e g a t i v e   ( d e n y )   a c c e s s   r u l e s .   Y o u   s h o u l d   n o t   u s e   t h e   A l w a y s A l l o w   m o d e   o n   a   K u b e r n e t e s   c l u s t e r   w h e r e   t h e   A P I   s e r v e r   i s   r e a c h a b l e   f r o m   t h e   p u b l i c   i n t e r n e t .


Question: What is The system:masters group?

Answer: T h e   s y s t e m : m a s t e r s   g r o u p   i s   a   b u i l t - i n   K u b e r n e t e s   g r o u p   t h a t   g r a n t s   u n r e s t r i c t e d   a c c e s s   t o   t h e   A P I   s e r v e r .   A n y   u s e r   a s s i g n e d   t o   t h i s   g r o u p   h a s   f u l l   c l u s t e r   a d m i n i s t r a t o r   p r i v i l e g e s ,   b y p a s s i n g   a n y   a u t h o r i z a t i o n   r e s t r i c t i o n s   i m p o s e d   b y   t h e   R B A C   o r   W e b h o o k   m e c h a n i s m s .   A v o i d   a d d i n g   u s e r s   t o   t h i s   g r o u p .   I f   y o u   d o   n e e d   t o   g r a n t   a   u s e r   c l u s t e r - a d m i n   r i g h t s ,   y o u   c a n   c r e a t e   a   C l u s t e r R o l e B i n d i n g   t o   t h e   b u i l t - i n   c l u s t e r - a d m i n   C l u s t e r R o l e .


Question: What is Authorization mode configuration?

Answer: Y o u   c a n   c o n f i g u r e   t h e   K u b e r n e t e s   A P I   s e r v e r ' s   a u t h o r i z e r   c h a i n   u s i n g   e i t h e r   a   c o n f i g u r a t i o n   f i l e   o n l y   o r   c o m m a n d   l i n e   a r g u m e n t s .   Y o u   h a v e   t o   p i c k   o n e   o f   t h e   t w o   c o n f i g u r a t i o n   a p p r o a c h e s ;   s e t t i n g   b o t h   - - a u t h o r i z a t i o n - c o n f i g   p a t h   a n d   c o n f i g u r i n g   a n   a u t h o r i z a t i o n   w e b h o o k   u s i n g   t h e   - - a u t h o r i z a t i o n - m o d e   a n d   - - a u t h o r i z a t i o n - w e b h o o k - *   c o m m a n d   l i n e   a r g u m e n t s   i s   n o t   a l l o w e d .   I f   y o u   t r y   t h i s ,   t h e   A P I   s e r v e r   r e p o r t s   a n   e r r o r   m e s s a g e   d u r i n g   s t a r t u p ,   t h e n   e x i t s   i m m e d i a t e l y .


Question: What is Configuring the API Server using an authorization config file?

Answer: K u b e r n e t e s   l e t s   y o u   c o n f i g u r e   a u t h o r i z a t i o n   c h a i n s   t h a t   c a n   i n c l u d e   m u l t i p l e   w e b h o o k s .   T h e   a u t h o r i z a t i o n   i t e m s   i n   t h a t   c h a i n   c a n   h a v e   w e l l - d e f i n e d   p a r a m e t e r s   t h a t   v a l i d a t e   r e q u e s t s   i n   a   p a r t i c u l a r   o r d e r ,   o f f e r i n g   y o u   f i n e - g r a i n e d   c o n t r o l ,   s u c h   a s   e x p l i c i t   D e n y   o n   f a i l u r e s .   T h e   c o n f i g u r a t i o n   f i l e   a p p r o a c h   e v e n   a l l o w s   y o u   t o   s p e c i f y   C E L   r u l e s   t o   p r e - f i l t e r   r e q u e s t s   b e f o r e   t h e y   a r e   d i s p a t c h e d   t o   w e b h o o k s ,   h e l p i n g   y o u   t o   p r e v e n t   u n n e c e s s a r y   i n v o c a t i o n s .   T h e   A P I   s e r v e r   a l s o   a u t o m a t i c a l l y   r e l o a d s   t h e   a u t h o r i z e r   c h a i n   w h e n   t h e   c o n f i g u r a t i o n   f i l e   i s   m o d i f i e d .   Y o u   s p e c i f y   t h e   p a t h   t o   t h e   a u t h o r i z a t i o n   c o n f i g u r a t i o n   u s i n g   t h e   - - a u t h o r i z a t i o n - c o n f i g   c o m m a n d   l i n e   a r g u m e n t .   I f   y o u   w a n t   t o   u s e   c o m m a n d   l i n e   a r g u m e n t s   i n s t e a d   o f   a   c o n f i g u r a t i o n   f i l e ,   t h a t ' s   a l s o   a   v a l i d   a n d   s u p p o r t e d   a p p r o a c h .   S o m e   a u t h o r i z a t i o n   c a p a b i l i t i e s   ( f o r   e x a m p l e :   m u l t i p l e   w e b h o o k s ,   w e b h o o k   f a i l u r e   p o l i c y ,   a n d   p r e - f i l t e r   r u l e s )   a r e   o n l y   a v a i l a b l e   i f   y o u   u s e   a n   a u t h o r i z a t i o n   c o n f i g u r a t i o n   f i l e .


Question: What is Example configuration?

Answer: - - -   #   #   D O   N O T   U S E   T H E   C O N F I G   A S   I S .   T H I S   I S   A N   E X A M P L E .   #   a p i V e r s i o n :   a p i s e r v e r . c o n f i g . k 8 s . i o / v 1   k i n d :   A u t h o r i z a t i o n C o n f i g u r a t i o n   a u t h o r i z e r s :   -   t y p e :   W e b h o o k   #   N a m e   u s e d   t o   d e s c r i b e   t h e   a u t h o r i z e r   #   T h i s   i s   e x p l i c i t l y   u s e d   i n   m o n i t o r i n g   m a c h i n e r y   f o r   m e t r i c s   #   N o t e :   #   -   V a l i d a t i o n   f o r   t h i s   f i e l d   i s   s i m i l a r   t o   h o w   K 8 s   l a b e l s   a r e   v a l i d a t e d   t o d a y .   #   R e q u i r e d ,   w i t h   n o   d e f a u l t   n a m e :   w e b h o o k   w e b h o o k :   #   T h e   d u r a t i o n   t o   c a c h e   ' a u t h o r i z e d '   r e s p o n s e s   f r o m   t h e   w e b h o o k   #   a u t h o r i z e r .   #   S a m e   a s   s e t t i n g   ` - - a u t h o r i z a t i o n - w e b h o o k - c a c h e - a u t h o r i z e d - t t l `   f l a g   #   D e f a u l t :   5 m 0 s   a u t h o r i z e d T T L :   3 0 s   #   I f   s e t   t o   f a l s e ,   ' a u t h o r i z e d '   r e s p o n s e s   f r o m   t h e   w e b h o o k   a r e   n o t   c a c h e d   #   a n d   t h e   s p e c i f i e d   a u t h o r i z e d T T L   i s   i g n o r e d / h a s   n o   e f f e c t .   #   S a m e   a s   s e t t i n g   ` - - a u t h o r i z a t i o n - w e b h o o k - c a c h e - a u t h o r i z e d - t t l `   f l a g   t o   ` 0 ` .   #   N o t e :   S e t t i n g   a u t h o r i z e d T T L   t o   ` 0 `   r e s u l t s   i n   i t s   d e f a u l t   v a l u e   b e i n g   u s e d .   #   D e f a u l t :   t r u e   c a c h e A u t h o r i z e d R e q u e s t s :   t r u e   #   T h e   d u r a t i o n   t o   c a c h e   ' u n a u t h o r i z e d '   r e s p o n s e s   f r o m   t h e   w e b h o o k   #   a u t h o r i z e r .   #


Question: What is Authorization configuration and reloads?

Answer: K u b e r n e t e s   r e l o a d s   t h e   a u t h o r i z a t i o n   c o n f i g u r a t i o n   f i l e   w h e n   t h e   A P I   s e r v e r   o b s e r v e s   a   c h a n g e   t o   t h e   f i l e ,   a n d   a l s o   o n   a   6 0   s e c o n d   s c h e d u l e   i f   n o   c h a n g e   e v e n t s   w e r e   o b s e r v e d .


Question: What is Note:?

Answer: Y o u   m u s t   e n s u r e   t h a t   a l l   n o n - w e b h o o k   a u t h o r i z e r   t y p e s   r e m a i n   u n c h a n g e d   i n   t h e   f i l e   o n   r e l o a d .   A   r e l o a d   m u s t   n o t   a d d   o r   r e m o v e   N o d e   o r   R B A C   a u t h o r i z e r s   ( t h e y   c a n   b e   r e o r d e r e d ,   b u t   c a n n o t   b e   a d d e d   o r   r e m o v e d ) .


Question: What is Command line authorization mode configuration?

Answer: Y o u   c a n   u s e   t h e   f o l l o w i n g   m o d e s :   - - a u t h o r i z a t i o n - m o d e = A B A C   ( A t t r i b u t e - b a s e d   a c c e s s   c o n t r o l   m o d e ) - - a u t h o r i z a t i o n - m o d e = R B A C   ( R o l e - b a s e d   a c c e s s   c o n t r o l   m o d e ) - - a u t h o r i z a t i o n - m o d e = N o d e   ( N o d e   a u t h o r i z e r ) - - a u t h o r i z a t i o n - m o d e = W e b h o o k   ( W e b h o o k   a u t h o r i z a t i o n   m o d e ) - - a u t h o r i z a t i o n - m o d e = A l w a y s A l l o w   ( a l w a y s   a l l o w s   r e q u e s t s ;   c a r r i e s   s e c u r i t y   r i s k s ) - - a u t h o r i z a t i o n - m o d e = A l w a y s D e n y   ( a l w a y s   d e n i e s   r e q u e s t s )   Y o u   c a n   c h o o s e   m o r e   t h a n   o n e   a u t h o r i z a t i o n   m o d e ;   f o r   e x a m p l e :   - - a u t h o r i z a t i o n - m o d e = N o d e , R B A C , W e b h o o k   K u b e r n e t e s   c h e c k s   a u t h o r i z a t i o n   m o d u l e s   b a s e d   o n   t h e   o r d e r   t h a t   y o u   s p e c i f y   t h e m   o n   t h e   A P I   s e r v e r ' s   c o m m a n d   l i n e ,   s o   a n   e a r l i e r   m o d u l e   h a s   h i g h e r   p r i o r i t y   t o   a l l o w   o r   d e n y   a   r e q u e s t .   Y o u   c a n n o t   c o m b i n e   t h e   - - a u t h o r i z a t i o n - m o d e   c o m m a n d   l i n e   a r g u m e n t   w i t h   t h e   - - a u t h o r i z a t i o n - c o n f i g   c o m m a n d   l i n e   a r g u m e n t   u s e d   f o r   c o n f i g u r i n g   a u t h o r i z a t i o n   u s i n g   a   l o c a l   f i l e .   F o r   m o r e   i n f o r m a t i o n   o n   c o m m a n d   l i n e   a r g u m e n t s   t o   t h e   A P I   s e r v e r ,   r e a d   t h e   k u b e - a p i s e r v e r   r e f e r e n c e .


Question: What is Privilege escalation via workload creation or edits?

Answer: U s e r s   w h o   c a n   c r e a t e / e d i t   p o d s   i n   a   n a m e s p a c e ,   e i t h e r   d i r e c t l y   o r   t h r o u g h   a n   o b j e c t   t h a t   e n a b l e s   i n d i r e c t   w o r k l o a d   m a n a g e m e n t ,   m a y   b e   a b l e   t o   e s c a l a t e   t h e i r   p r i v i l e g e s   i n   t h a t   n a m e s p a c e .   T h e   p o t e n t i a l   r o u t e s   t o   p r i v i l e g e   e s c a l a t i o n   i n c l u d e   K u b e r n e t e s   A P I   e x t e n s i o n s   a n d   t h e i r   a s s o c i a t e d   c o n t r o l l e r s .


Question: What is Escalation paths?

Answer: T h e r e   a r e   d i f f e r e n t   w a y s   t h a t   a n   a t t a c k e r   o r   u n t r u s t w o r t h y   u s e r   c o u l d   g a i n   a d d i t i o n a l   p r i v i l e g e   w i t h i n   a   n a m e s p a c e ,   i f   y o u   a l l o w   t h e m   t o   r u n   a r b i t r a r y   P o d s   i n   t h a t   n a m e s p a c e :   M o u n t i n g   a r b i t r a r y   S e c r e t s   i n   t h a t   n a m e s p a c e C a n   b e   u s e d   t o   a c c e s s   c o n f i d e n t i a l   i n f o r m a t i o n   m e a n t   f o r   o t h e r   w o r k l o a d s C a n   b e   u s e d   t o   o b t a i n   a   m o r e   p r i v i l e g e d   S e r v i c e A c c o u n t ' s   s e r v i c e   a c c o u n t   t o k e n U s i n g   a r b i t r a r y   S e r v i c e A c c o u n t s   i n   t h a t   n a m e s p a c e C a n   p e r f o r m   K u b e r n e t e s   A P I   a c t i o n s   a s   a n o t h e r   w o r k l o a d   ( i m p e r s o n a t i o n ) C a n   p e r f o r m   a n y   p r i v i l e g e d   a c t i o n s   t h a t   S e r v i c e A c c o u n t   h a s M o u n t i n g   o r   u s i n g   C o n f i g M a p s   m e a n t   f o r   o t h e r   w o r k l o a d s   i n   t h a t   n a m e s p a c e C a n   b e   u s e d   t o   o b t a i n   i n f o r m a t i o n   m e a n t   f o r   o t h e r   w o r k l o a d s ,   s u c h   a s   d a t a b a s e   h o s t   n a m e s . M o u n t i n g   v o l u m e s   m e a n t   f o r   o t h e r   w o r k l o a d s   i n   t h a t   n a m e s p a c e C a n   b e   u s e d   t o   o b t a i n   i n f o r m a t i o n   m e a n t   f o r   o t h e r   w o r k l o a d s ,   a n d   c h a n g e   i t .   C a n   b e   u s e d   t o   a c c e s s   c o n f i d e n t i a l   i n f o r m a t i o n   m e a n t   f o r   o t h e r   w o r k l o a d s C a n   b e   u s e d   t o   o b t a i n   a   m o r e   p r i v i l e g e d   S e r v i c e A c c o u n t ' s   s e r v i c e   a c c o u n t   t o k e n   C a n   p e


Question: What is Checking API access?

Answer: k u b e c t l   p r o v i d e s   t h e   a u t h   c a n - i   s u b c o m m a n d   f o r   q u i c k l y   q u e r y i n g   t h e   A P I   a u t h o r i z a t i o n   l a y e r .   T h e   c o m m a n d   u s e s   t h e   S e l f S u b j e c t A c c e s s R e v i e w   A P I   t o   d e t e r m i n e   i f   t h e   c u r r e n t   u s e r   c a n   p e r f o r m   a   g i v e n   a c t i o n ,   a n d   w o r k s   r e g a r d l e s s   o f   t h e   a u t h o r i z a t i o n   m o d e   u s e d .   k u b e c t l   a u t h   c a n - i   c r e a t e   d e p l o y m e n t s   - - n a m e s p a c e   d e v   T h e   o u t p u t   i s   s i m i l a r   t o   t h i s :   y e s   k u b e c t l   a u t h   c a n - i   c r e a t e   d e p l o y m e n t s   - - n a m e s p a c e   p r o d   T h e   o u t p u t   i s   s i m i l a r   t o   t h i s :   n o   A d m i n i s t r a t o r s   c a n   c o m b i n e   t h i s   w i t h   u s e r   i m p e r s o n a t i o n   t o   d e t e r m i n e   w h a t   a c t i o n   o t h e r   u s e r s   c a n   p e r f o r m .   k u b e c t l   a u t h   c a n - i   l i s t   s e c r e t s   - - n a m e s p a c e   d e v   - - a s   d a v e   T h e   o u t p u t   i s   s i m i l a r   t o   t h i s :   n o   S i m i l a r l y ,   t o   c h e c k   w h e t h e r   a   S e r v i c e A c c o u n t   n a m e d   d e v - s a   i n   N a m e s p a c e   d e v   c a n   l i s t   P o d s   i n   t h e   N a m e s p a c e   t a r g e t :   k u b e c t l   a u t h   c a n - i   l i s t   p o d s   \   - - n a m e s p a c e   t a r g e t   \   - - a s   s y s t e m : s e r v i c e a c c o u n t : d e v : d e v - s a   T h e   o u t p u t   i s   s i m i l a r   t o   t h i s :   y e s   S e l f S u b j e c t A c c e s s R e v i e w   i s   p a r t   o f   t h e   a u t h o r i z a t i o n . k 8 s . i o   A P I   g r o u p ,   w h i c h   e x p o s e s   t h e   A P I   s e r v e r   a u t h o r i z a t i o n   t o   e x t e r n a l   s e r


Question: What is What's next?

Answer: T o   l e a r n   m o r e   a b o u t   A u t h e n t i c a t i o n ,   s e e   A u t h e n t i c a t i o n . F o r   a n   o v e r v i e w ,   r e a d   C o n t r o l l i n g   A c c e s s   t o   t h e   K u b e r n e t e s   A P I . T o   l e a r n   m o r e   a b o u t   A d m i s s i o n   C o n t r o l ,   s e e   U s i n g   A d m i s s i o n   C o n t r o l l e r s . R e a d   m o r e   a b o u t   C o m m o n   E x p r e s s i o n   L a n g u a g e   i n   K u b e r n e t e s .


Question: What is Learn Kubernetes Basics?

Answer: This is the multi-page printable view of this section. Click here to print.Return to the regular view of this page.Learn Kubernetes Basics1: Create a Cluster1.1: Using Minikube to Create a Cluster2: Deploy an App2.1: Using kubectl to Create a Deployment3: Explore Your App3.1: Viewing Pods and Nodes4: Expose Your App Publicly4.1: Using a Service to Expose Your App5: Scale Your App5.1: Running Multiple Instances of Your App6: Update Your App6.1: Performing a Rolling UpdateObjectivesThis tutorial provides a walkthrough of the basics of the Kubernetes cluster orchestration system. Each module contains some background information on major Kubernetes features and concepts, and a tutorial for you to follow along.Using the tutorials, you can learn to:Deploy a containerized application on a cluster.Scale the deployment.Update the containerized application with a new software version.Debug the containerized application.What can Kubernetes do for you?With modern web services, users expect applications to be available 24/7, and developers expect to deploy new versions of those applications several times a day. Containerization helps package software to serve these goals, enabling applications to be released and updated without downtime. Kubernetes helps you make sure those containerized applications run where and when you want, and helps them find the resources and tools they need to work. Kubernetes is a production-ready, open source platform designed with Google's accumulated experience in container orchestration, combined with best-of-breed ideas from the community.Kubernetes Basics Modules1. Create a Kubernetes cluster2. Deploy an app3. Explore your app4. Expose your app publicly5. Scale up your app6. Update your appWhat's


Question: How does Learn Kubernetes Basics work?

Answer: This is the multi-page printable view of this section. Click here to print.Return to the regular view of this page.Learn Kubernetes Basics1: Create a Cluster1.1: Using Minikube to Create a Cluster2: Deploy an App2.1: Using kubectl to Create a Deployment3: Explore Your App3.1: Viewing Pods and Nodes4: Expose Your App Publicly4.1: Using a Service to Expose Your App5: Scale Your App5.1: Running Multiple Instances of Your App6: Update Your App6.1: Performing a Rolling UpdateObjectivesThis tutorial provides a walkthrough of the basics of the Kubernetes cluster orchestration system. Each module contains some background information on major Kubernetes features and concepts, and a tutorial for you to follow along.Using the tutorials, you can learn to:Deploy a containerized application on a cluster.Scale the deployment.Update the containerized application with a new software version.Debug the containerized application.What can Kubernetes do for you?With modern web services, users expect applications to be available 24/7, and developers expect to deploy new versions of those applications several times a day. Containerization helps package software to serve these goals, enabling applications to be released and updated without downtime. Kubernetes helps you make sure those containerized applications run where and when you want, and helps them find the resources and tools they need to work. Kubernetes is a production-ready, open source platform designed with Google's accumulated experience in container orchestration, combined with best-of-breed ideas from the community.Kubernetes Basics Modules1. Create a Kubernetes cluster2. Deploy an app3. Explore your app4. Expose your app publicly5. Scale up your app6. Update your appWhat's


Question: When would you use Learn Kubernetes Basics?

Answer: This is the multi-page printable view of this section. Click here to print.Return to the regular view of this page.Learn Kubernetes Basics1: Create a Cluster1.1: Using Minikube to Create a Cluster2: Deploy an App2.1: Using kubectl to Create a Deployment3: Explore Your App3.1: Viewing Pods and Nodes4: Expose Your App Publicly4.1: Using a Service to Expose Your App5: Scale Your App5.1: Running Multiple Instances of Your App6: Update Your App6.1: Performing a Rolling UpdateObjectivesThis tutorial provides a walkthrough of the basics of the Kubernetes cluster orchestration system. Each module contains some background information on major Kubernetes features and concepts, and a tutorial for you to follow along.Using the tutorials, you can learn to:Deploy a containerized application on a cluster.Scale the deployment.Update the containerized application with a new software version.Debug the containerized application.What can Kubernetes do for you?With modern web services, users expect applications to be available 24/7, and developers expect to deploy new versions of those applications several times a day. Containerization helps package software to serve these goals, enabling applications to be released and updated without downtime. Kubernetes helps you make sure those containerized applications run where and when you want, and helps them find the resources and tools they need to work. Kubernetes is a production-ready, open source platform designed with Google's accumulated experience in container orchestration, combined with best-of-breed ideas from the community.Kubernetes Basics Modules1. Create a Kubernetes cluster2. Deploy an app3. Explore your app4. Expose your app publicly5. Scale up your app6. Update your appWhat's


Question: What are the benefits of Learn Kubernetes Basics?

Answer: This is the multi-page printable view of this section. Click here to print.Return to the regular view of this page.Learn Kubernetes Basics1: Create a Cluster1.1: Using Minikube to Create a Cluster2: Deploy an App2.1: Using kubectl to Create a Deployment3: Explore Your App3.1: Viewing Pods and Nodes4: Expose Your App Publicly4.1: Using a Service to Expose Your App5: Scale Your App5.1: Running Multiple Instances of Your App6: Update Your App6.1: Performing a Rolling UpdateObjectivesThis tutorial provides a walkthrough of the basics of the Kubernetes cluster orchestration system. Each module contains some background information on major Kubernetes features and concepts, and a tutorial for you to follow along.Using the tutorials, you can learn to:Deploy a containerized application on a cluster.Scale the deployment.Update the containerized application with a new software version.Debug the containerized application.What can Kubernetes do for you?With modern web services, users expect applications to be available 24/7, and developers expect to deploy new versions of those applications several times a day. Containerization helps package software to serve these goals, enabling applications to be released and updated without downtime. Kubernetes helps you make sure those containerized applications run where and when you want, and helps them find the resources and tools they need to work. Kubernetes is a production-ready, open source platform designed with Google's accumulated experience in container orchestration, combined with best-of-breed ideas from the community.Kubernetes Basics Modules1. Create a Kubernetes cluster2. Deploy an app3. Explore your app4. Expose your app publicly5. Scale up your app6. Update your appWhat's


Question: What is Learn Kubernetes Basics?

Answer: 1 :   C r e a t e   a   C l u s t e r 1 . 1 :   U s i n g   M i n i k u b e   t o   C r e a t e   a   C l u s t e r 2 :   D e p l o y   a n   A p p 2 . 1 :   U s i n g   k u b e c t l   t o   C r e a t e   a   D e p l o y m e n t 3 :   E x p l o r e   Y o u r   A p p 3 . 1 :   V i e w i n g   P o d s   a n d   N o d e s 4 :   E x p o s e   Y o u r   A p p   P u b l i c l y 4 . 1 :   U s i n g   a   S e r v i c e   t o   E x p o s e   Y o u r   A p p 5 :   S c a l e   Y o u r   A p p 5 . 1 :   R u n n i n g   M u l t i p l e   I n s t a n c e s   o f   Y o u r   A p p 6 :   U p d a t e   Y o u r   A p p 6 . 1 :   P e r f o r m i n g   a   R o l l i n g   U p d a t e   1 . 1 :   U s i n g   M i n i k u b e   t o   C r e a t e   a   C l u s t e r   2 . 1 :   U s i n g   k u b e c t l   t o   C r e a t e   a   D e p l o y m e n t   3 . 1 :   V i e w i n g   P o d s   a n d   N o d e s   4 . 1 :   U s i n g   a   S e r v i c e   t o   E x p o s e   Y o u r   A p p   5 . 1 :   R u n n i n g   M u l t i p l e   I n s t a n c e s   o f   Y o u r   A p p   6 . 1 :   P e r f o r m i n g   a   R o l l i n g   U p d a t e


Question: What is Objectives?

Answer: T h i s   t u t o r i a l   p r o v i d e s   a   w a l k t h r o u g h   o f   t h e   b a s i c s   o f   t h e   K u b e r n e t e s   c l u s t e r   o r c h e s t r a t i o n   s y s t e m .   E a c h   m o d u l e   c o n t a i n s   s o m e   b a c k g r o u n d   i n f o r m a t i o n   o n   m a j o r   K u b e r n e t e s   f e a t u r e s   a n d   c o n c e p t s ,   a n d   a   t u t o r i a l   f o r   y o u   t o   f o l l o w   a l o n g .   U s i n g   t h e   t u t o r i a l s ,   y o u   c a n   l e a r n   t o :   D e p l o y   a   c o n t a i n e r i z e d   a p p l i c a t i o n   o n   a   c l u s t e r . S c a l e   t h e   d e p l o y m e n t . U p d a t e   t h e   c o n t a i n e r i z e d   a p p l i c a t i o n   w i t h   a   n e w   s o f t w a r e   v e r s i o n . D e b u g   t h e   c o n t a i n e r i z e d   a p p l i c a t i o n .


Question: What is What can Kubernetes do for you??

Answer: W i t h   m o d e r n   w e b   s e r v i c e s ,   u s e r s   e x p e c t   a p p l i c a t i o n s   t o   b e   a v a i l a b l e   2 4 / 7 ,   a n d   d e v e l o p e r s   e x p e c t   t o   d e p l o y   n e w   v e r s i o n s   o f   t h o s e   a p p l i c a t i o n s   s e v e r a l   t i m e s   a   d a y .   C o n t a i n e r i z a t i o n   h e l p s   p a c k a g e   s o f t w a r e   t o   s e r v e   t h e s e   g o a l s ,   e n a b l i n g   a p p l i c a t i o n s   t o   b e   r e l e a s e d   a n d   u p d a t e d   w i t h o u t   d o w n t i m e .   K u b e r n e t e s   h e l p s   y o u   m a k e   s u r e   t h o s e   c o n t a i n e r i z e d   a p p l i c a t i o n s   r u n   w h e r e   a n d   w h e n   y o u   w a n t ,   a n d   h e l p s   t h e m   f i n d   t h e   r e s o u r c e s   a n d   t o o l s   t h e y   n e e d   t o   w o r k .   K u b e r n e t e s   i s   a   p r o d u c t i o n - r e a d y ,   o p e n   s o u r c e   p l a t f o r m   d e s i g n e d   w i t h   G o o g l e ' s   a c c u m u l a t e d   e x p e r i e n c e   i n   c o n t a i n e r   o r c h e s t r a t i o n ,   c o m b i n e d   w i t h   b e s t - o f - b r e e d   i d e a s   f r o m   t h e   c o m m u n i t y .


Question: What is What's next?

Answer: T u t o r i a l   U s i n g   M i n i k u b e   t o   C r e a t e   a   C l u s t e r


Question: What is 1 - Create a Cluster?

Answer: L e a r n   a b o u t   K u b e r n e t e s   c l u s t e r   a n d   c r e a t e   a   s i m p l e   c l u s t e r   u s i n g   M i n i k u b e .


Question: What is Objectives?

Answer: L e a r n   w h a t   a   K u b e r n e t e s   c l u s t e r   i s . L e a r n   w h a t   M i n i k u b e   i s . S t a r t   a   K u b e r n e t e s   c l u s t e r   o n   y o u r   c o m p u t e r .


Question: What is Kubernetes Clusters?

Answer: K u b e r n e t e s   c o o r d i n a t e s   a   h i g h l y   a v a i l a b l e   c l u s t e r   o f   c o m p u t e r s   t h a t   a r e   c o n n e c t e d   t o   w o r k   a s   a   s i n g l e   u n i t .   T h e   a b s t r a c t i o n s   i n   K u b e r n e t e s   a l l o w   y o u   t o   d e p l o y   c o n t a i n e r i z e d   a p p l i c a t i o n s   t o   a   c l u s t e r   w i t h o u t   t y i n g   t h e m   s p e c i f i c a l l y   t o   i n d i v i d u a l   m a c h i n e s .   T o   m a k e   u s e   o f   t h i s   n e w   m o d e l   o f   d e p l o y m e n t ,   a p p l i c a t i o n s   n e e d   t o   b e   p a c k a g e d   i n   a   w a y   t h a t   d e c o u p l e s   t h e m   f r o m   i n d i v i d u a l   h o s t s :   t h e y   n e e d   t o   b e   c o n t a i n e r i z e d .   C o n t a i n e r i z e d   a p p l i c a t i o n s   a r e   m o r e   f l e x i b l e   a n d   a v a i l a b l e   t h a n   i n   p a s t   d e p l o y m e n t   m o d e l s ,   w h e r e   a p p l i c a t i o n s   w e r e   i n s t a l l e d   d i r e c t l y   o n t o   s p e c i f i c   m a c h i n e s   a s   p a c k a g e s   d e e p l y   i n t e g r a t e d   i n t o   t h e   h o s t .   K u b e r n e t e s   a u t o m a t e s   t h e   d i s t r i b u t i o n   a n d   s c h e d u l i n g   o f   a p p l i c a t i o n   c o n t a i n e r s   a c r o s s   a   c l u s t e r   i n   a   m o r e   e f f i c i e n t   w a y .   K u b e r n e t e s   i s   a n   o p e n - s o u r c e   p l a t f o r m   a n d   i s   p r o d u c t i o n - r e a d y .   A   K u b e r n e t e s   c l u s t e r   c o n s i s t s   o f   t w o   t y p e s   o f   r e s o u r c e s :   T h e   C o n t r o l   P l a n e   c o o r d i n a t e s   t h e   c l u s t e r N o d e s   a r e   t h e   w o r k e r s   t h a t   r u n   a p p l i c a t i o n s


Question: What is Cluster Diagram?

Answer: T h e   C o n t r o l   P l a n e   i s   r e s p o n s i b l e   f o r   m a n a g i n g   t h e   c l u s t e r .   T h e   C o n t r o l   P l a n e   c o o r d i n a t e s   a l l   a c t i v i t i e s   i n   y o u r   c l u s t e r ,   s u c h   a s   s c h e d u l i n g   a p p l i c a t i o n s ,   m a i n t a i n i n g   a p p l i c a t i o n s '   d e s i r e d   s t a t e ,   s c a l i n g   a p p l i c a t i o n s ,   a n d   r o l l i n g   o u t   n e w   u p d a t e s .   A   n o d e   i s   a   V M   o r   a   p h y s i c a l   c o m p u t e r   t h a t   s e r v e s   a s   a   w o r k e r   m a c h i n e   i n   a   K u b e r n e t e s   c l u s t e r .   E a c h   n o d e   h a s   a   K u b e l e t ,   w h i c h   i s   a n   a g e n t   f o r   m a n a g i n g   t h e   n o d e   a n d   c o m m u n i c a t i n g   w i t h   t h e   K u b e r n e t e s   c o n t r o l   p l a n e .   T h e   n o d e   s h o u l d   a l s o   h a v e   t o o l s   f o r   h a n d l i n g   c o n t a i n e r   o p e r a t i o n s ,   s u c h   a s   c o n t a i n e r d   o r   C R I - O .   A   K u b e r n e t e s   c l u s t e r   t h a t   h a n d l e s   p r o d u c t i o n   t r a f f i c   s h o u l d   h a v e   a   m i n i m u m   o f   t h r e e   n o d e s   b e c a u s e   i f   o n e   n o d e   g o e s   d o w n ,   b o t h   a n   e t c d   m e m b e r   a n d   a   c o n t r o l   p l a n e   i n s t a n c e   a r e   l o s t ,   a n d   r e d u n d a n c y   i s   c o m p r o m i s e d .   Y o u   c a n   m i t i g a t e   t h i s   r i s k   b y   a d d i n g   m o r e   c o n t r o l   p l a n e   n o d e s .   W h e n   y o u   d e p l o y   a p p l i c a t i o n s   o n   K u b e r n e t e s ,   y o u   t e l l   t h e   c o n t r o l   p l a n e   t o   s t a r t   t h e   a p p l i c a t i o n   c o n t a i n e r s .   T h e   c o n t r o l   p l a n e   s c h e d u l e s   t h e   c o n t a i n e r s   t o   r u n   o n   t h e   c l u s t e


Question: What is What's next?

Answer: T u t o r i a l   H e l l o   M i n i k u b e . L e a r n   m o r e   a b o u t   C l u s t e r   A r c h i t e c t u r e .


Question: What is Objectives?

Answer: L e a r n   a b o u t   a p p l i c a t i o n   D e p l o y m e n t s . D e p l o y   y o u r   f i r s t   a p p   o n   K u b e r n e t e s   w i t h   k u b e c t l .


Question: What is Note:?

Answer: O n c e   y o u   h a v e   a   r u n n i n g   K u b e r n e t e s   c l u s t e r ,   y o u   c a n   d e p l o y   y o u r   c o n t a i n e r i z e d   a p p l i c a t i o n s   o n   t o p   o f   i t .   T o   d o   s o ,   y o u   c r e a t e   a   K u b e r n e t e s   D e p l o y m e n t .   T h e   D e p l o y m e n t   i n s t r u c t s   K u b e r n e t e s   h o w   t o   c r e a t e   a n d   u p d a t e   i n s t a n c e s   o f   y o u r   a p p l i c a t i o n .   O n c e   y o u ' v e   c r e a t e d   a   D e p l o y m e n t ,   t h e   K u b e r n e t e s   c o n t r o l   p l a n e   s c h e d u l e s   t h e   a p p l i c a t i o n   i n s t a n c e s   i n c l u d e d   i n   t h a t   D e p l o y m e n t   t o   r u n   o n   i n d i v i d u a l   N o d e s   i n   t h e   c l u s t e r .   O n c e   t h e   a p p l i c a t i o n   i n s t a n c e s   a r e   c r e a t e d ,   a   K u b e r n e t e s   D e p l o y m e n t   c o n t r o l l e r   c o n t i n u o u s l y   m o n i t o r s   t h o s e   i n s t a n c e s .   I f   t h e   N o d e   h o s t i n g   a n   i n s t a n c e   g o e s   d o w n   o r   i s   d e l e t e d ,   t h e   D e p l o y m e n t   c o n t r o l l e r   r e p l a c e s   t h e   i n s t a n c e   w i t h   a n   i n s t a n c e   o n   a n o t h e r   N o d e   i n   t h e   c l u s t e r .   T h i s   p r o v i d e s   a   s e l f - h e a l i n g   m e c h a n i s m   t o   a d d r e s s   m a c h i n e   f a i l u r e   o r   m a i n t e n a n c e .   I n   a   p r e - o r c h e s t r a t i o n   w o r l d ,   i n s t a l l a t i o n   s c r i p t s   w o u l d   o f t e n   b e   u s e d   t o   s t a r t   a p p l i c a t i o n s ,   b u t   t h e y   d i d   n o t   a l l o w   r e c o v e r y   f r o m   m a c h i n e   f a i l u r e .   B y   b o t h   c r e a t i n g   y o u r   a p p l i c a t i o n   i n s t a n c e s   a n d   k e e p i n g   t h e m   r u n n i n g   a c r o s s   N o d e s ,   K u


Question: What is Deploying your first app on Kubernetes?

Answer: Y o u   c a n   c r e a t e   a n d   m a n a g e   a   D e p l o y m e n t   b y   u s i n g   t h e   K u b e r n e t e s   c o m m a n d   l i n e   i n t e r f a c e ,   k u b e c t l .   k u b e c t l   u s e s   t h e   K u b e r n e t e s   A P I   t o   i n t e r a c t   w i t h   t h e   c l u s t e r .   I n   t h i s   m o d u l e ,   y o u ' l l   l e a r n   t h e   m o s t   c o m m o n   k u b e c t l   c o m m a n d s   n e e d e d   t o   c r e a t e   D e p l o y m e n t s   t h a t   r u n   y o u r   a p p l i c a t i o n s   o n   a   K u b e r n e t e s   c l u s t e r .   W h e n   y o u   c r e a t e   a   D e p l o y m e n t ,   y o u ' l l   n e e d   t o   s p e c i f y   t h e   c o n t a i n e r   i m a g e   f o r   y o u r   a p p l i c a t i o n   a n d   t h e   n u m b e r   o f   r e p l i c a s   t h a t   y o u   w a n t   t o   r u n .   Y o u   c a n   c h a n g e   t h a t   i n f o r m a t i o n   l a t e r   b y   u p d a t i n g   y o u r   D e p l o y m e n t ;   M o d u l e   5   a n d   M o d u l e   6   o f   t h e   b o o t c a m p   d i s c u s s   h o w   y o u   c a n   s c a l e   a n d   u p d a t e   y o u r   D e p l o y m e n t s .   F o r   y o u r   f i r s t   D e p l o y m e n t ,   y o u ' l l   u s e   a   h e l l o - n o d e   a p p l i c a t i o n   p a c k a g e d   i n   a   D o c k e r   c o n t a i n e r   t h a t   u s e s   N G I N X   t o   e c h o   b a c k   a l l   t h e   r e q u e s t s .   ( I f   y o u   d i d n ' t   a l r e a d y   t r y   c r e a t i n g   a   h e l l o - n o d e   a p p l i c a t i o n   a n d   d e p l o y i n g   i t   u s i n g   a   c o n t a i n e r ,   y o u   c a n   d o   t h a t   f i r s t   b y   f o l l o w i n g   t h e   i n s t r u c t i o n s   f r o m   t h e   H e l l o   M i n i k u b e   t u t o r i a l . )   Y o u   w i l l   n e e d   t o   h a v e   i n s t a l l e d   k u b e c t l   a s   w e l l .   I f   y o u   n e e d   t o   i n s t a l l


Question: What is kubectl basics?

Answer: T h e   c o m m o n   f o r m a t   o f   a   k u b e c t l   c o m m a n d   i s :   k u b e c t l   a c t i o n   r e s o u r c e .   T h i s   p e r f o r m s   t h e   s p e c i f i e d   a c t i o n   ( l i k e   c r e a t e ,   d e s c r i b e   o r   d e l e t e )   o n   t h e   s p e c i f i e d   r e s o u r c e   ( l i k e   n o d e   o r   d e p l o y m e n t .   Y o u   c a n   u s e   - - h e l p   a f t e r   t h e   s u b c o m m a n d   t o   g e t   a d d i t i o n a l   i n f o   a b o u t   p o s s i b l e   p a r a m e t e r s   ( f o r   e x a m p l e :   k u b e c t l   g e t   n o d e s   - - h e l p ) .   C h e c k   t h a t   k u b e c t l   i s   c o n f i g u r e d   t o   t a l k   t o   y o u r   c l u s t e r ,   b y   r u n n i n g   t h e   k u b e c t l   v e r s i o n   c o m m a n d .   C h e c k   t h a t   k u b e c t l   i s   i n s t a l l e d   a n d   t h a t   y o u   c a n   s e e   b o t h   t h e   c l i e n t   a n d   t h e   s e r v e r   v e r s i o n s .   T o   v i e w   t h e   n o d e s   i n   t h e   c l u s t e r ,   r u n   t h e   k u b e c t l   g e t   n o d e s   c o m m a n d .   Y o u   s e e   t h e   a v a i l a b l e   n o d e s .   L a t e r ,   K u b e r n e t e s   w i l l   c h o o s e   w h e r e   t o   d e p l o y   o u r   a p p l i c a t i o n   b a s e d   o n   N o d e   a v a i l a b l e   r e s o u r c e s .


Question: What is Deploy an app?

Answer: L e t ’ s   d e p l o y   o u r   f i r s t   a p p   o n   K u b e r n e t e s   w i t h   t h e   k u b e c t l   c r e a t e   d e p l o y m e n t   c o m m a n d .   W e   n e e d   t o   p r o v i d e   t h e   d e p l o y m e n t   n a m e   a n d   a p p   i m a g e   l o c a t i o n   ( i n c l u d e   t h e   f u l l   r e p o s i t o r y   u r l   f o r   i m a g e s   h o s t e d   o u t s i d e   D o c k e r   H u b ) .   k u b e c t l   c r e a t e   d e p l o y m e n t   k u b e r n e t e s - b o o t c a m p   - - i m a g e = g c r . i o / g o o g l e - s a m p l e s / k u b e r n e t e s - b o o t c a m p : v 1   G r e a t !   Y o u   j u s t   d e p l o y e d   y o u r   f i r s t   a p p l i c a t i o n   b y   c r e a t i n g   a   d e p l o y m e n t .   T h i s   p e r f o r m e d   a   f e w   t h i n g s   f o r   y o u :   s e a r c h e d   f o r   a   s u i t a b l e   n o d e   w h e r e   a n   i n s t a n c e   o f   t h e   a p p l i c a t i o n   c o u l d   b e   r u n   ( w e   h a v e   o n l y   1   a v a i l a b l e   n o d e ) s c h e d u l e d   t h e   a p p l i c a t i o n   t o   r u n   o n   t h a t   N o d e c o n f i g u r e d   t h e   c l u s t e r   t o   r e s c h e d u l e   t h e   i n s t a n c e   o n   a   n e w   N o d e   w h e n   n e e d e d   T o   l i s t   y o u r   d e p l o y m e n t s   u s e   t h e   k u b e c t l   g e t   d e p l o y m e n t s   c o m m a n d :   k u b e c t l   g e t   d e p l o y m e n t s   W e   s e e   t h a t   t h e r e   i s   1   d e p l o y m e n t   r u n n i n g   a   s i n g l e   i n s t a n c e   o f   y o u r   a p p .   T h e   i n s t a n c e   i s   r u n n i n g   i n s i d e   a   c o n t a i n e r   o n   y o u r   n o d e .


Question: What is View the app?

Answer: P o d s   t h a t   a r e   r u n n i n g   i n s i d e   K u b e r n e t e s   a r e   r u n n i n g   o n   a   p r i v a t e ,   i s o l a t e d   n e t w o r k .   B y   d e f a u l t   t h e y   a r e   v i s i b l e   f r o m   o t h e r   p o d s   a n d   s e r v i c e s   w i t h i n   t h e   s a m e   K u b e r n e t e s   c l u s t e r ,   b u t   n o t   o u t s i d e   t h a t   n e t w o r k .   W h e n   w e   u s e   k u b e c t l ,   w e ' r e   i n t e r a c t i n g   t h r o u g h   a n   A P I   e n d p o i n t   t o   c o m m u n i c a t e   w i t h   o u r   a p p l i c a t i o n .   W e   w i l l   c o v e r   o t h e r   o p t i o n s   o n   h o w   t o   e x p o s e   y o u r   a p p l i c a t i o n   o u t s i d e   t h e   K u b e r n e t e s   c l u s t e r   l a t e r ,   i n   M o d u l e   4 .   A l s o   a s   a   b a s i c   t u t o r i a l ,   w e ' r e   n o t   e x p l a i n i n g   w h a t   P o d s   a r e   i n   a n y   d e t a i l   h e r e ,   i t   w i l l   b e   c o v e r e d   i n   l a t e r   t o p i c s .   T h e   k u b e c t l   p r o x y   c o m m a n d   c a n   c r e a t e   a   p r o x y   t h a t   w i l l   f o r w a r d   c o m m u n i c a t i o n s   i n t o   t h e   c l u s t e r - w i d e ,   p r i v a t e   n e t w o r k .   T h e   p r o x y   c a n   b e   t e r m i n a t e d   b y   p r e s s i n g   c o n t r o l - C   a n d   w o n ' t   s h o w   a n y   o u t p u t   w h i l e   i t ' s   r u n n i n g .   Y o u   n e e d   t o   o p e n   a   s e c o n d   t e r m i n a l   w i n d o w   t o   r u n   t h e   p r o x y .   k u b e c t l   p r o x y   W e   n o w   h a v e   a   c o n n e c t i o n   b e t w e e n   o u r   h o s t   ( t h e   t e r m i n a l )   a n d   t h e   K u b e r n e t e s   c l u s t e r .   T h e   p r o x y   e n a b l e s   d i r e c t   a c c e s s   t o   t h e   A P I   f r o m   t h e s e   t e r m i n a l s .   Y o u   c a n   s e e   a l l   t h o s e   A P I


Question: What is Note:?

Answer: T h e   A P I   s e r v e r   w i l l   a u t o m a t i c a l l y   c r e a t e   a n   e n d p o i n t   f o r   e a c h   p o d ,   b a s e d   o n   t h e   p o d   n a m e ,   t h a t   i s   a l s o   a c c e s s i b l e   t h r o u g h   t h e   p r o x y .   F i r s t   w e   n e e d   t o   g e t   t h e   P o d   n a m e ,   a n d   w e ' l l   s t o r e   i t   i n   t h e   e n v i r o n m e n t   v a r i a b l e   P O D _ N A M E .   e x p o r t   P O D _ N A M E = $ ( k u b e c t l   g e t   p o d s   - o   g o - t e m p l a t e   - - t e m p l a t e   ' { { r a n g e   . i t e m s } } { { . m e t a d a t a . n a m e } } { { " \ n " } } { { e n d } } ' )   e c h o   N a m e   o f   t h e   P o d :   $ P O D _ N A M E   Y o u   c a n   a c c e s s   t h e   P o d   t h r o u g h   t h e   p r o x i e d   A P I ,   b y   r u n n i n g :   c u r l   h t t p : / / l o c a l h o s t : 8 0 0 1 / a p i / v 1 / n a m e s p a c e s / d e f a u l t / p o d s / $ P O D _ N A M E : 8 0 8 0 / p r o x y /   I n   o r d e r   f o r   t h e   n e w   D e p l o y m e n t   t o   b e   a c c e s s i b l e   w i t h o u t   u s i n g   t h e   p r o x y ,   a   S e r v i c e   i s   r e q u i r e d   w h i c h   w i l l   b e   e x p l a i n e d   i n   M o d u l e   4 .


Question: What is What's next?

Answer: T u t o r i a l   V i e w i n g   P o d s   a n d   N o d e s . L e a r n   m o r e   a b o u t   D e p l o y m e n t s .


Question: What is Objectives?

Answer: L e a r n   a b o u t   K u b e r n e t e s   P o d s . L e a r n   a b o u t   K u b e r n e t e s   N o d e s . T r o u b l e s h o o t   d e p l o y e d   a p p l i c a t i o n s .


Question: What is Kubernetes Pods?

Answer: W h e n   y o u   c r e a t e d   a   D e p l o y m e n t   i n   M o d u l e   2 ,   K u b e r n e t e s   c r e a t e d   a   P o d   t o   h o s t   y o u r   a p p l i c a t i o n   i n s t a n c e .   A   P o d   i s   a   K u b e r n e t e s   a b s t r a c t i o n   t h a t   r e p r e s e n t s   a   g r o u p   o f   o n e   o r   m o r e   a p p l i c a t i o n   c o n t a i n e r s   ( s u c h   a s   D o c k e r ) ,   a n d   s o m e   s h a r e d   r e s o u r c e s   f o r   t h o s e   c o n t a i n e r s .   T h o s e   r e s o u r c e s   i n c l u d e :   S h a r e d   s t o r a g e ,   a s   V o l u m e s N e t w o r k i n g ,   a s   a   u n i q u e   c l u s t e r   I P   a d d r e s s I n f o r m a t i o n   a b o u t   h o w   t o   r u n   e a c h   c o n t a i n e r ,   s u c h   a s   t h e   c o n t a i n e r   i m a g e   v e r s i o n   o r   s p e c i f i c   p o r t s   t o   u s e   A   P o d   m o d e l s   a n   a p p l i c a t i o n - s p e c i f i c   " l o g i c a l   h o s t "   a n d   c a n   c o n t a i n   d i f f e r e n t   a p p l i c a t i o n   c o n t a i n e r s   w h i c h   a r e   r e l a t i v e l y   t i g h t l y   c o u p l e d .   F o r   e x a m p l e ,   a   P o d   m i g h t   i n c l u d e   b o t h   t h e   c o n t a i n e r   w i t h   y o u r   N o d e . j s   a p p   a s   w e l l   a s   a   d i f f e r e n t   c o n t a i n e r   t h a t   f e e d s   t h e   d a t a   t o   b e   p u b l i s h e d   b y   t h e   N o d e . j s   w e b s e r v e r .   T h e   c o n t a i n e r s   i n   a   P o d   s h a r e   a n   I P   A d d r e s s   a n d   p o r t   s p a c e ,   a r e   a l w a y s   c o - l o c a t e d   a n d   c o - s c h e d u l e d ,   a n d   r u n   i n   a   s h a r e d   c o n t e x t   o n   t h e   s a m e   N o d e .   P o d s   a r e   t h e   a t o m i c   u n i t   o n   t h e   K u b e r n e t e s   p l a t f o r m .   W h e n   w e   c r e a t e   a   D e p l o y m e n t   o


Question: What is Nodes?

Answer: A   P o d   a l w a y s   r u n s   o n   a   N o d e .   A   N o d e   i s   a   w o r k e r   m a c h i n e   i n   K u b e r n e t e s   a n d   m a y   b e   e i t h e r   a   v i r t u a l   o r   a   p h y s i c a l   m a c h i n e ,   d e p e n d i n g   o n   t h e   c l u s t e r .   E a c h   N o d e   i s   m a n a g e d   b y   t h e   c o n t r o l   p l a n e .   A   N o d e   c a n   h a v e   m u l t i p l e   p o d s ,   a n d   t h e   K u b e r n e t e s   c o n t r o l   p l a n e   a u t o m a t i c a l l y   h a n d l e s   s c h e d u l i n g   t h e   p o d s   a c r o s s   t h e   N o d e s   i n   t h e   c l u s t e r .   T h e   c o n t r o l   p l a n e ' s   a u t o m a t i c   s c h e d u l i n g   t a k e s   i n t o   a c c o u n t   t h e   a v a i l a b l e   r e s o u r c e s   o n   e a c h   N o d e .   E v e r y   K u b e r n e t e s   N o d e   r u n s   a t   l e a s t :   K u b e l e t ,   a   p r o c e s s   r e s p o n s i b l e   f o r   c o m m u n i c a t i o n   b e t w e e n   t h e   K u b e r n e t e s   c o n t r o l   p l a n e   a n d   t h e   N o d e ;   i t   m a n a g e s   t h e   P o d s   a n d   t h e   c o n t a i n e r s   r u n n i n g   o n   a   m a c h i n e . A   c o n t a i n e r   r u n t i m e   ( l i k e   D o c k e r )   r e s p o n s i b l e   f o r   p u l l i n g   t h e   c o n t a i n e r   i m a g e   f r o m   a   r e g i s t r y ,   u n p a c k i n g   t h e   c o n t a i n e r ,   a n d   r u n n i n g   t h e   a p p l i c a t i o n .   K u b e l e t ,   a   p r o c e s s   r e s p o n s i b l e   f o r   c o m m u n i c a t i o n   b e t w e e n   t h e   K u b e r n e t e s   c o n t r o l   p l a n e   a n d   t h e   N o d e ;   i t   m a n a g e s   t h e   P o d s   a n d   t h e   c o n t a i n e r s   r u n n i n g   o n   a   m a c h i n e .   A   c o n t a i n e r   r u n t i m e   ( l i k e   D o c k e r )   r e s p o n s i b l e   f o r   p u l l i n g   t h e   c o n t


Question: What is Troubleshooting with kubectl?

Answer: I n   M o d u l e   2 ,   y o u   u s e d   t h e   k u b e c t l   c o m m a n d - l i n e   i n t e r f a c e .   Y o u ' l l   c o n t i n u e   t o   u s e   i t   i n   M o d u l e   3   t o   g e t   i n f o r m a t i o n   a b o u t   d e p l o y e d   a p p l i c a t i o n s   a n d   t h e i r   e n v i r o n m e n t s .   T h e   m o s t   c o m m o n   o p e r a t i o n s   c a n   b e   d o n e   w i t h   t h e   f o l l o w i n g   k u b e c t l   s u b c o m m a n d s :   k u b e c t l   g e t   -   l i s t   r e s o u r c e s k u b e c t l   d e s c r i b e   -   s h o w   d e t a i l e d   i n f o r m a t i o n   a b o u t   a   r e s o u r c e k u b e c t l   l o g s   -   p r i n t   t h e   l o g s   f r o m   a   c o n t a i n e r   i n   a   p o d k u b e c t l   e x e c   -   e x e c u t e   a   c o m m a n d   o n   a   c o n t a i n e r   i n   a   p o d   Y o u   c a n   u s e   t h e s e   c o m m a n d s   t o   s e e   w h e n   a p p l i c a t i o n s   w e r e   d e p l o y e d ,   w h a t   t h e i r   c u r r e n t   s t a t u s e s   a r e ,   w h e r e   t h e y   a r e   r u n n i n g   a n d   w h a t   t h e i r   c o n f i g u r a t i o n s   a r e .   N o w   t h a t   w e   k n o w   m o r e   a b o u t   o u r   c l u s t e r   c o m p o n e n t s   a n d   t h e   c o m m a n d   l i n e ,   l e t ' s   e x p l o r e   o u r   a p p l i c a t i o n .


Question: What is Check application configuration?

Answer: L e t ' s   v e r i f y   t h a t   t h e   a p p l i c a t i o n   w e   d e p l o y e d   i n   t h e   p r e v i o u s   s c e n a r i o   i s   r u n n i n g .   W e ' l l   u s e   t h e   k u b e c t l   g e t   c o m m a n d   a n d   l o o k   f o r   e x i s t i n g   P o d s :   k u b e c t l   g e t   p o d s   I f   n o   p o d s   a r e   r u n n i n g ,   p l e a s e   w a i t   a   c o u p l e   o f   s e c o n d s   a n d   l i s t   t h e   P o d s   a g a i n .   Y o u   c a n   c o n t i n u e   o n c e   y o u   s e e   o n e   P o d   r u n n i n g .   N e x t ,   t o   v i e w   w h a t   c o n t a i n e r s   a r e   i n s i d e   t h a t   P o d   a n d   w h a t   i m a g e s   a r e   u s e d   t o   b u i l d   t h o s e   c o n t a i n e r s   w e   r u n   t h e   k u b e c t l   d e s c r i b e   p o d s   c o m m a n d :   k u b e c t l   d e s c r i b e   p o d s   W e   s e e   h e r e   d e t a i l s   a b o u t   t h e   P o d ’ s   c o n t a i n e r :   I P   a d d r e s s ,   t h e   p o r t s   u s e d   a n d   a   l i s t   o f   e v e n t s   r e l a t e d   t o   t h e   l i f e c y c l e   o f   t h e   P o d .   T h e   o u t p u t   o f   t h e   d e s c r i b e   s u b c o m m a n d   i s   e x t e n s i v e   a n d   c o v e r s   s o m e   c o n c e p t s   t h a t   w e   d i d n ’ t   e x p l a i n   y e t ,   b u t   d o n ’ t   w o r r y ,   t h e y   w i l l   b e c o m e   f a m i l i a r   b y   t h e   e n d   o f   t h i s   t u t o r i a l .


Question: What is Show the app in the terminal?

Answer: R e c a l l   t h a t   P o d s   a r e   r u n n i n g   i n   a n   i s o l a t e d ,   p r i v a t e   n e t w o r k   -   s o   w e   n e e d   t o   p r o x y   a c c e s s   t o   t h e m   s o   w e   c a n   d e b u g   a n d   i n t e r a c t   w i t h   t h e m .   T o   d o   t h i s ,   w e ' l l   u s e   t h e   k u b e c t l   p r o x y   c o m m a n d   t o   r u n   a   p r o x y   i n   a   s e c o n d   t e r m i n a l .   O p e n   a   n e w   t e r m i n a l   w i n d o w ,   a n d   i n   t h a t   n e w   t e r m i n a l ,   r u n :   k u b e c t l   p r o x y   N o w   a g a i n ,   w e ' l l   g e t   t h e   P o d   n a m e   a n d   q u e r y   t h a t   p o d   d i r e c t l y   t h r o u g h   t h e   p r o x y .   T o   g e t   t h e   P o d   n a m e   a n d   s t o r e   i t   i n   t h e   P O D _ N A M E   e n v i r o n m e n t   v a r i a b l e :   e x p o r t   P O D _ N A M E = " $ ( k u b e c t l   g e t   p o d s   - o   g o - t e m p l a t e   - - t e m p l a t e   ' { { r a n g e   . i t e m s } } { { . m e t a d a t a . n a m e } } { { " \ n " } } { { e n d } } ' ) "   e c h o   N a m e   o f   t h e   P o d :   $ P O D _ N A M E   T o   s e e   t h e   o u t p u t   o f   o u r   a p p l i c a t i o n ,   r u n   a   c u r l   r e q u e s t :   c u r l   h t t p : / / l o c a l h o s t : 8 0 0 1 / a p i / v 1 / n a m e s p a c e s / d e f a u l t / p o d s / $ P O D _ N A M E : 8 0 8 0 / p r o x y /   T h e   U R L   i s   t h e   r o u t e   t o   t h e   A P I   o f   t h e   P o d .


Question: What is Executing commands on the container?

Answer: W e   c a n   e x e c u t e   c o m m a n d s   d i r e c t l y   o n   t h e   c o n t a i n e r   o n c e   t h e   P o d   i s   u p   a n d   r u n n i n g .   F o r   t h i s ,   w e   u s e   t h e   e x e c   s u b c o m m a n d   a n d   u s e   t h e   n a m e   o f   t h e   P o d   a s   a   p a r a m e t e r .   L e t ’ s   l i s t   t h e   e n v i r o n m e n t   v a r i a b l e s :   k u b e c t l   e x e c   " $ P O D _ N A M E "   - -   e n v   A g a i n ,   i t ' s   w o r t h   m e n t i o n i n g   t h a t   t h e   n a m e   o f   t h e   c o n t a i n e r   i t s e l f   c a n   b e   o m i t t e d   s i n c e   w e   o n l y   h a v e   a   s i n g l e   c o n t a i n e r   i n   t h e   P o d .   N e x t   l e t ’ s   s t a r t   a   b a s h   s e s s i o n   i n   t h e   P o d ’ s   c o n t a i n e r :   k u b e c t l   e x e c   - t i   $ P O D _ N A M E   - -   b a s h   W e   h a v e   n o w   a n   o p e n   c o n s o l e   o n   t h e   c o n t a i n e r   w h e r e   w e   r u n   o u r   N o d e J S   a p p l i c a t i o n .   T h e   s o u r c e   c o d e   o f   t h e   a p p   i s   i n   t h e   s e r v e r . j s   f i l e :   c a t   s e r v e r . j s   Y o u   c a n   c h e c k   t h a t   t h e   a p p l i c a t i o n   i s   u p   b y   r u n n i n g   a   c u r l   c o m m a n d :   c u r l   h t t p : / / l o c a l h o s t : 8 0 8 0


Question: What is Note:?

Answer: T o   c l o s e   y o u r   c o n t a i n e r   c o n n e c t i o n ,   t y p e   e x i t .


Question: What is What's next?

Answer: T u t o r i a l   U s i n g   A   S e r v i c e   T o   E x p o s e   Y o u r   A p p . L e a r n   m o r e   a b o u t   P o d s . L e a r n   m o r e   a b o u t   N o d e s .


Question: What is Objectives?

Answer: L e a r n   a b o u t   a   S e r v i c e   i n   K u b e r n e t e s . U n d e r s t a n d   h o w   l a b e l s   a n d   s e l e c t o r s   r e l a t e   t o   a   S e r v i c e . E x p o s e   a n   a p p l i c a t i o n   o u t s i d e   a   K u b e r n e t e s   c l u s t e r .