diff --git a/Makefile b/Makefile index 43c6a5c..4475113 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,16 @@ IMAGE_TAG ?= docker.educg.net/k8s/manager:dev +build: export CGO_ENABLED=0 +build: export GOOS=linux +build: export GOARCH=amd64 build: - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o out/manager + go build -o out/manager main.go docker: build docker build --rm -t $(IMAGE_TAG) . + +install: docker + kubectl apply -f install.yaml + +uninstall: + kubectl delete -f install.yaml \ No newline at end of file diff --git a/install.yaml b/install.yaml index 81382db..02d28b6 100644 --- a/install.yaml +++ b/install.yaml @@ -22,4 +22,17 @@ spec: - containerPort: 8080 --- apiVersion: v1 -kind: Service \ No newline at end of file +kind: Service +metadata: + name: k8s-manager-service + labels: + name: k8s-manager-service +spec: + type: NodePort + ports: + - port: 80 + targetPort: 8080 + protocol: TCP + nodePort: 30001 + selector: + app: k8s-manager-deployment \ No newline at end of file