From the course: Kubernetes for Java Developers

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Kubernetes resources

Kubernetes resources

From the course: Kubernetes for Java Developers

Start my 1-month free trial

Kubernetes resources

- [Instructor] We learn about the basic building blocks of Kubernetes resources for pods. Let's look at some other Kubernetes resources next. Our deployment object provides declarative updates for pods. You describe a desired state and a deployment object and Kubernetes cluster changes the actual state to the desired state at a controlled rate. Multiple replicas of a pod can be created by specifying the number of replicas. A new version of the pod can be rolled out to all replicas or it can roll back to a previously deployed version. That is how a sample Kubernetes deployment manifest might look like. Let's walk through this. You can see the apiVersion is different here. The Kubernetes object to be created here is a deployment. Usual metadata section. In spec, replicas is a new entry and defines a number of desired pods. Selector defines a label selector for pods. MatchLabel in that defines the exact set of labels that are matched. Any pods matching these labels will be included in…

Contents