Using Kubernetes
We have the whole Kubernetes environment ready and kubectl
configured. This means that it's high time to finally present the power of Kubernetes and deploy our first application. Let's use the leszko/calculator
Docker image that we built in the previous chapters and start it in multiple replicas on Kubernetes.
Deploying an application
In order to start a Docker container on Kubernetes, we need to prepare a deployment configuration as a YAML file. Let's name it deployment.yaml
:
apiVersion: apps/v1 kind: Deployment (1) metadata: name: calculator-deployment (2) labels: app: calculator spec: replicas: 3 (3) selector: &...