Skip to content

How to run this on a cloud provider

Course: Kubernetes Part 2 - chapter 4

Go to a cloud provider like

  1. AWS
  2. GCP
  3. Digital ocean
  4. Vultr and create a k8s cluster
  • Create a cluster

  • Download the credentials file and replace ~/.kube/config with it

  • Create a deployment manifest

apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx2:latest
ports:
- containerPort: 80
  • Create a deployment
kubectl apply -f deployment.yml