Kubernetes User Guide: Difference between revisions
Created Kubernetes User Guide for new k3s cluster |
m removed "template:info" |
||
| Line 1: | Line 1: | ||
= Kubernetes = |
= Kubernetes = |
||
We are running a [https://kubernetes.io/ Kubernetes] cluster on-prem on Tahini and Teriyaki servers. Each member gets their own namespace in which they can deploy their applications. |
We are running a [https://kubernetes.io/ Kubernetes] cluster on-prem on Tahini and Teriyaki servers. Each member gets their own namespace in which they can deploy their applications. |
||
{{Info|If you wish to learn about how to operate a Kubernetes cluster, you may create your own cluster using software such as [https://k3s.io/ k3s]. If all you want to do is run some containerized apps, then we suggest that you use our cluster instead, since it has far more resources.}} |
|||
== Account resource limits == |
== Account resource limits == |
||
| Line 14: | Line 12: | ||
If you wish to acquire more resources, please send an email to the Systems Committee with a brief justification. |
If you wish to acquire more resources, please send an email to the Systems Committee with a brief justification. |
||
{{Info|LoadBalancer services are disabled because we handle external traffic through Traefik, which we manage ourselves. See [[#Exposing your app|Exposing your app]] below.}} |
|||
== Create a new namespace == |
== Create a new namespace == |
||
Latest revision as of 22:24, 10 September 2026
Kubernetes
We are running a Kubernetes cluster on-prem on Tahini and Teriyaki servers. Each member gets their own namespace in which they can deploy their applications.
Account resource limits
As of August 23, 2026, the per-namespace resource limits for each member are:
- 40 pods
- 10 jobs
- 10 cron jobs
- 25 GB of Persistent Volume Claims
- 5 NodePort services
If you wish to acquire more resources, please send an email to the Systems Committee with a brief justification.
Create a new namespace
Log into a general-use machine and run the following:
ceo k8s account activate
This will create a new Kubernetes namespace with the name csc-username. A new kubeconfig file will be placed into ~/.kube/config. Your kubeconfig points at your namespace by default, so all commands you run will land there unless you specify otherwise.
To verify that everything is working, run:
kubectl cluster-info
The output should look something like this:
Kubernetes control plane is running at https://129.97.134.5:6443 CoreDNS is running at https://129.97.134.5:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
Quickstart
Say you have a Dockerized app and the image is available on a public registry such as Docker Hub or Quay.io. Here is the minimum you need to get your app running in the cluster.
First, create a Deployment:
kubectl create deployment demo --image=ctdalek/myapp --port=80
Replace --image and --port as needed.
If your app does not need to be publicly accessible, you are done. Otherwise, create a Service to expose your Deployment:
kubectl expose deployment demo
Then create an Ingress to expose the Service to the outside world:
kubectl create ingress demo --rule='ctdalek.k8s.csclub.cloud/*=demo:80'
Your app will be accessible at https://ctdalek.k8s.csclub.cloud. If you wish to use a custom domain, please contact the Systems Committee.
For non-web apps, use a NodePort instead of an Ingress. NodePorts are only accessible from on-campus.
Further reading
Kubernetes is well documented, so we will not repeat it here:
You may also contact the Systems Committee if something is not working the way you expect.