Skip to content

Instantly share code, notes, and snippets.

@vfarcic
Created October 30, 2022 19:03
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vfarcic/b8e3d6bc4b8ed6b31b816a8ca07735db to your computer and use it in GitHub Desktop.
Save vfarcic/b8e3d6bc4b8ed6b31b816a8ca07735db to your computer and use it in GitHub Desktop.
# Source: https://gist.github.com/b8e3d6bc4b8ed6b31b816a8ca07735db
##################################################################
# Do NOT Use Docker Compose! Develop In Kubernetes (With Okteto) #
# https://youtu.be/RTo9Pvo_yiY #
##################################################################
# Additional Info:
# - Okteto: https://okteto.com
# - Zeet: https://go.zeet.co/devopstoolkit
# - Development Environments Made Easy With Tilt Rebuilds And Live Updates: https://youtu.be/fkODRlobR9I
# - Skaffold - How to Build and Deploy In Kubernetes: https://youtu.be/qS_4Qf8owc0
#########
# Setup #
#########
# Install `okteto` CLI from https://www.okteto.com/docs/getting-started/#installing-okteto-cli
git clone https://github.com/vfarcic/okteto-demo-2
cd okteto-demo-2
######################################
# Replace Docker Compose With Okteto #
######################################
okteto context
# Choose `https://cloud.okteto.com (Okteto Cloud)`
# It could be my own local or remote cluster
okteto up
ls -1
go run .
# Open `http://localhost:8080` in a browser
# Open root.go in an editor and modify it
# Press `ctrl+c`
go run .
# Open `http://localhost:8080` in a browser
# Press `ctrl+c`
exit
cat okteto.yaml
cat k8s/service.yaml
# Show `metadata.annotations`
cat k8s/ing.yaml
# Show `metadata.annotations`
okteto destroy
# Open https://cloud.okteto.com in a browser
# Press the `Launch Dev Environment` button
# Open `https://cloud.okteto.com/#/previews` in a browser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment