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.

Deploy using standalone single manifest

Deploy using standalone single manifest

From the course: Kubernetes for Java Developers

Start my 1-month free trial

Deploy using standalone single manifest

- [Instructor] We've deployed a Kubernetes deployment and a Kubernetes service using two separate manifest files. But more often than not, we would like to deploy them as a single manifest file. Let's see how we can achieve that. I'm in the workspace directory. Let's go to manifests, standalone directory, and we will look at greeting.yaml. Now this greeting.yaml, has exact same deployment manifest that we explained earlier. On line 24 is our key message here, where we're doing three dashes, basically showing that this is a new resource is starting from here onwards. And then line 25 onwards, of course, is our service. So essentially, you can put as many Kubernetes objects in a single manifest file separated by three dashes over here. So let's go ahead and deploy this manifest as one single file. So kubectl create dash F, you guessed it right, greeting.yaml, just one file. And as you can see, the message has changed, it's creating deployment and service for us. And let me show you a…

Contents