How to create a local development environment for Kubernetes?

前端 未结 12 1674
谎友^
谎友^ 2020-12-22 18:59

Kubernetes seems to be all about deploying containers to a cloud of clusters. What it doesn\'t seem to touch is development and staging environments (or such).

Durin

12条回答
  •  青春惊慌失措
    2020-12-22 19:21

    Here is the way I did a local set up for Kubernetes in Windows 10: -

    • Use Docker Desktop

    • Enable Kubernetes in the settings option of Docker Desktop

    • In Docker Desktop by default resource allocated for Memory is 2GB so to use Kubernetes with Docker Desktop increase the memory.

    • Install kubectl as a client to talk to Kubernetes cluster

    • Run command kubectl config get-contexts to get the available cluster

    • Run command kubectl config use-context docker-desktop to use the docker desktop

    • Build a docker image of your application

    • Write a YAML file (descriptive method to create your deployment in Kubernetes) pointing to the image created in above step cluster

    • Expose a service of type node port for each of your deployment to make it available to the outside world

提交回复
热议问题