User Tools

Site Tools


howto:learn_k8s

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
howto:learn_k8s [2023/04/02 23:17] andrewfergusonhowto:learn_k8s [2023/07/29 11:13] (current) – removed tcmal
Line 1: Line 1:
-====== Learn Kubernetes (k8s) ====== 
  
-Kubernetes (k8s for short) is pretty complicated, but 90% of the time you can get by knowing very little of it. 
- 
-===== First, Make some containers ===== 
- 
-k8s organises containers for us, so first we need to understand how to use containers. 
- 
-The most popular tool for working with containers on the desktop is Docker. It's installed on the sandbox VM, so you can SSH in and try it immediately. Here are some starter tutorials: 
- 
-  * [[https://docs.docker.com/get-started/|Docker's official tutorial]] 
-  * [[https://stackify.com/docker-tutorial/|A shorter tutorial from stackify]] 
-  * [[https://www.freecodecamp.org/news/the-docker-handbook/|A longer course from freeCodeCamp.org]] 
- 
-===== Then, do things with them ===== 
- 
-Now that you know all about containerisation, you're ready to start making k8s arrange containers for you. Go and [[https://console.tardisproject.uk/k8s/|create a namespace]] and get logged in [[https://tardisproject.uk/join|(go here to get an account if you haven't already!)]], then try following along with these: 
- 
-  * [[https://kubernetes.io/docs/tutorials/kubernetes-basics/|The official k8s tutorial]] 
-  * [[https://www.freecodecamp.org/news/learn-kubernetes-in-under-3-hours-a-detailed-guide-to-orchestrating-containers-114ff420e882/|A beginner-friendly course by freeCodeCamp.org]] 
-  * [[https://kubebyexample.com/learning-paths/kubernetes-fundamentals/what-kubernetes-3-minutes|A very in detail course from red hat]] 
- 
-===== Putting things on the internet ===== 
- 
-When you're debugging, you can use [[https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/|''kubectl port-forward'']] to access your application. Eventually though, you'll probably want to put it on the internet. 
- 
-Currently we allow you to host things at ''<username>.tardis.ac/whatever''. We use [[https://traefik.io/traefik/|Traefik]] to do this, but you don't need to worry about the details. This manifest will expose the port named ''web'' for the service ''awesome-app'' to the world. 
- 
-<code> 
-apiVersion: networking.k8s.io/v1 
-kind: Ingress 
-metadata: 
-  name: awesome-app 
-spec: 
-  rules: 
-  - host: USERNAME.tardis.ac 
-    http: 
-      paths: 
-      - path: / 
-        pathType: Prefix 
-        backend: 
-          service: 
-            name: awesome-app 
-            port: 
-              name: web 
-</code> 
- 
-You can route different subdirectories of your domain to different apps by changing the ''path'' attribute, or by creating new ingress objects. If you get stuck, don't be afraid to ask in [[https://comp-soc.com/chat|our chat]]. 
- 
-If you want to use a custom domain (or one of our top-level ones), currently you'll need to contact an admin - we plan to automate this soon though. 
- 
-If what you're building doesn't use HTTP, also talk to an admin and we'll get this sorted for you. 
howto/learn_k8s.1680477463.txt.gz · Last modified: 2023/04/02 23:17 by andrewferguson