Kubernetes Pods vs Google Cloud Deployments

My apologies if this question seems obvious, but the documentation of Coubernes and Google Cloud is extremely confusing and inconsistent in places.

Anyway, I clicked the Dockerized web server on my private Google Container registry. I want this container to be restarted if it dies, but I only need one instance to start at any time. In addition, there are many environment variables that must be defined in order to configure the server correctly.

I have already created a new cluster. But where should I go? Some tutorials say you need to declare paging files and services, but then the next tutorial says that you should not declare containers directly, but use deployments instead. As a result, I was terribly confused.

What is the best approach for this simple use case? Also, what is the recommended documentation for using Kubernetes on Google Cloud? (Google white papers look outdated.)

+4
source share
1 answer

Based on your description, I suggest you use Deployment with replicasset to 1. Deployment ensures that there is always one instance of your pod. You can define environment variables in the pod template spec your deployment manifest.

. , Deployments recommended .

durable node .

, , , ( GKE) http://kubernetes.io/docs/.

+6

Source: https://habr.com/ru/post/1659511/


All Articles