This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ kubectl --namespace=production get events -w |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ kubectl --namespace=production rollout status deployment/kubeapp-production | |
Waiting for rollout to finish: 1 of 3 updated replicas are available... | |
Waiting for rollout to finish: 2 of 3 updated replicas are available... | |
deployment "kubeapp-production" successfully rolled out |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ kubectl --namespace=production apply -f app-production.yml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ kubectl create namespace production |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sed -i.bak "s#PROJECT_ID#$PROJECT_ID#" app-production.yml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: Deployment | |
apiVersion: extensions/v1beta1 | |
metadata: | |
name: kubeapp-production | |
spec: | |
replicas: 3 | |
template: | |
metadata: | |
name: kubeapp | |
labels: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ export app_version=1.0 | |
$ docker build --build-arg version=$app_version -t gcr.io/$PROJECT_ID/app:$app_version . | |
Sending build context to Docker daemon 16.48MB | |
Step 1/6 : FROM alpine:latest | |
---> 7328f6f8b418 | |
Step 2/6 : MAINTAINER The Dockbit Team "[email protected]" | |
---> Using cache | |
---> 6abecc069f97 | |
Step 3/6 : ARG version=1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:latest | |
MAINTAINER The Dockbit Team "[email protected]" | |
# In case no version is passed | |
ARG version=1.0 | |
COPY source/$version/app /app | |
EXPOSE 8080 | |
ENTRYPOINT ["/app"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ GOOS=linux GOARCH=amd64 go build -tags netgo -o app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"net/http" | |
) | |
const version string = "1.0" | |
func getFrontpage(w http.ResponseWriter, r *http.Request) { |