Skip to content
Snippets Groups Projects
Commit bd256747 authored by Marcus Schiesser's avatar Marcus Schiesser
Browse files

added hello world example for kubernetes

parent 3bd47db6
No related branches found
No related tags found
No related merge requests found
FROM golang:1.16
WORKDIR /go/src/app
COPY main.go .
CMD ["go", "run", "main.go"]
\ No newline at end of file
## 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
apiVersion: v1
kind: Pod
metadata:
name: gok8s
spec:
containers:
- name: gok8s
image: turngeek/gok8s
imagePullPolicy: Never
restartPolicy: Never
\ No newline at end of file
package main
import "fmt"
func main() {
fmt.Println("Hello World!")
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment