diff --git a/src/gok8s/Dockerfile b/src/gok8s/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..2276f821d4faea1ce12dcbd11c399770904917e9 --- /dev/null +++ b/src/gok8s/Dockerfile @@ -0,0 +1,6 @@ +FROM golang:1.16 + +WORKDIR /go/src/app +COPY main.go . + +CMD ["go", "run", "main.go"] \ No newline at end of file diff --git a/src/gok8s/README.md b/src/gok8s/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c08aadb28a606810440d5e6be38a2caf4f058eec --- /dev/null +++ b/src/gok8s/README.md @@ -0,0 +1,13 @@ +## GoK8S + +1. Ensure that Docker Desktop is running with Kubernetes enabled + +2. Build the docker image + + # docker build . -t turngeek/gok8s + +3. Run the pod on Kubernetes + + # kubectl apply -f gok8s.yaml + +4. Run the pod on Kubernetes diff --git a/src/gok8s/gok8s.yaml b/src/gok8s/gok8s.yaml new file mode 100644 index 0000000000000000000000000000000000000000..da19992196bc89099dab6d46f33ec6db6e432994 --- /dev/null +++ b/src/gok8s/gok8s.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Pod +metadata: + name: gok8s +spec: + containers: + - name: gok8s + image: turngeek/gok8s + imagePullPolicy: Never + restartPolicy: Never \ No newline at end of file diff --git a/src/gok8s/main.go b/src/gok8s/main.go new file mode 100644 index 0000000000000000000000000000000000000000..b1b14d0c797c1bd1f0d324b743d6c19635c2f713 --- /dev/null +++ b/src/gok8s/main.go @@ -0,0 +1,7 @@ +package main + +import "fmt" + +func main() { + fmt.Println("Hello World!") +}