Okteto : Kubernetes as a Service for Developers

1. Login to Okteto with your Github Account

2. Download KUBECONFIG file and Connect to the Cluster

Just after First Login

3. Download okteto CLI :

curl https://get.okteto.com -sSfL | sh

4. Run your first app

git clone https://github.com/abdennour/samples.git
cd samples/golang
okteto up
  • “okteto/golang:1" is a mutable image and it has capabilities not only to run the app but also to build it.
  • an rsync service is running to update the container with the last code changes.
  • Whenever you run okteto up , a new PVC will be created to persist that environment ( Check “kubectl get pvc” output at the end of this article).
Installing dependencies...syncthing-Darwin-x86_64 18.30 MiB / 18.30 MiB [=============================================] 100.00% 10sDeployment hello-world doesn't exist in namespace abdennour. Do you want to create a new one? [y/n]: y✓  Persistent volume provisioned✓  Files synchronized✓  Okteto Environment activatedNamespace: abdennourName:      hello-worldForward:   8080 -> 8080           2345 -> 2345
The hello-world app is deployed
okteto> go run main.go
App is UP

5. Inspect Resources with Kubectl

➜  golang git:(master) ✗ k get podNAME                           READY   STATUS    RESTARTS   AGEhello-world-67645897dc-kqlxl   1/1     Running   0          44mokteto-hello-world-0           1/1     Running   0          29m
➜ golang git:(master) ✗ k get deploymentNAME READY UP-TO-DATE AVAILABLE AGEhello-world 1/1 1 1 44m➜ golang git:(master) ✗ k get svcNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGEhello-world ClusterIP <none> 8080/TCP 44m➜ golang git:(master) ✗ k get pvcNAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGEpvc-0-okteto-hello-world-0 Bound pvc-3946b68f-ce66-11e9-98b5-42010a800173 10Gi RWO standard 47mpvc-1-okteto-hello-world-0 Bound pvc-3948cfeb-ce66-11e9-98b5-42010a800173 10Gi RWO standard 47mpvc-2-okteto-hello-world-0 Bound pvc-394c409c-ce66-11e9-98b5-42010a800173 10Gi RWO standard 47m➜ golang git:(master) ✗ k get ingressNAME HOSTS ADDRESS PORTS AGEokteto-hello-world hello-world-abdennour.cloud.okteto.net, 80, 443 44m

Note :




Software engineer, Cloud Architect, 5/5 AWS|GCP|PSM Certified, Owner of kubernetes.tn

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abdennour Toumi

Abdennour Toumi

Software engineer, Cloud Architect, 5/5 AWS|GCP|PSM Certified, Owner of kubernetes.tn

More from Medium

Fixing “current release manifest contains removed kubernetes api(s)”

Setting up a Prometheus monitoring stack in Kubernetes

Podman Containers — Beginner’s Guide

Deploying a Rancher RKE Cluster with eBPF — CNCF Roadmap