-
-
Save davidalger/24e7a7a2f15790933a2935d7c741128f to your computer and use it in GitHub Desktop.
Revisions
-
kevin-smets revised this gist
Jun 21, 2018 . 1 changed file with 6 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -49,9 +49,13 @@ Should output something like: eval $(minikube docker-env) Add this line to `.bash_profile` or `.zshrc` or ... if you want to use minikube's daemon by default (or if you do not want to set this every time you open a new terminal). You can revert back to the host docker daemon by running: eval $(docker-machine env -u) If you now run `docker ps`, it should now output something like: ``` CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES -
kevin-smets revised this gist
Jun 21, 2018 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -49,6 +49,8 @@ Should output something like: eval $(minikube docker-env) Add this line to `.bash_profile` or `.zshrc` or ... if you do not want to run this every time you open a new terminal. Running `docker ps` should now output something like: ``` -
kevin-smets revised this gist
Jan 22, 2018 . 1 changed file with 0 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -118,10 +118,6 @@ You're now good to go and deploy other images! rm -rf ~/.minikube .kube; brew uninstall kubectl; brew cask uninstall docker virtualbox minikube; # Version -
kevin-smets revised this gist
Jan 22, 2018 . No changes.There are no files selected for viewing
-
kevin-smets revised this gist
Jan 22, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -121,7 +121,7 @@ You're now good to go and deploy other images! # TODO Will try to convert this to xhyve when possible.˜˜ # Version -
kevin-smets revised this gist
Oct 23, 2017 . No changes.There are no files selected for viewing
-
kevin-smets revised this gist
Oct 23, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -17,7 +17,7 @@ spec: run: my-app-exposed spec: containers: - image: localhost:5000/my-app:0.1.0 name: my-app ports: - containerPort: 80 -
kevin-smets revised this gist
Oct 20, 2017 . 4 changed files with 21 additions and 18 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -19,11 +19,11 @@ brew update && brew install kubectl && brew cask install docker minikube virtual # Verify docker --version # Docker version 17.09.0-ce, build afdb6d4 docker-compose --version # docker-compose version 1.16.1, build 6d1ac21 docker-machine --version # docker-machine version 0.12.2, build 9371605 minikube version # minikube version: v0.22.3 kubectl version --client # Client Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.1", GitCommit:"f38e43b221d08850172a9a4ea785a86a3ffa3b3a", GitTreeState:"clean", BuildDate:"2017-10-12T00:45:05Z", GoVersion:"go1.9.1", Compiler:"gc", Platform:"darwin/amd64"} # Start @@ -42,8 +42,8 @@ Great! You now have a running Kubernetes cluster locally. Minikube started a vir Should output something like: NAME STATUS ROLES AGE VERSION minikube Ready <none> 40s v1.7.5 # Use minikube's built-in docker daemon: @@ -65,21 +65,23 @@ First setup a local registry, so Kubernetes can pull the image(s) from there: ## Build First of, store all files (Dockerfile, my-app.yml, index.html) in this gist locally in some new (empty) directory. You can build the Dockerfile below locally if you want to follow this guide to the letter. Store the Dockerfile locally, preferably in an empty directory and run: docker build . --tag my-app You should now have an image named 'my-app' locally, check by using `docker images` (or your own image of course). You can then publish it to your local docker registry: docker tag my-app localhost:5000/my-app:0.1.0 Running `docker images` should now output the following: ``` REPOSITORY TAG IMAGE ID CREATED SIZE my-app latest cc949ad8c8d3 44 seconds ago 89.3MB localhost:5000/my-app 0.1.0 cc949ad8c8d3 44 seconds ago 89.3MB httpd 2.4-alpine fe26194c0b94 7 days ago 89.3MB ``` ## Deploy and run @@ -96,7 +98,7 @@ The configuration exposes `my-app` outside of the cluster, you can get the addre minikube service my-app --url This should give an output like `http://192.168.99.100:30304` (the port will most likely differ). Go there with your favorite browser, you should see "Hello world!". You just accessed your application from outside of your local Kubernetes cluster! # Kubernetes GUI @@ -123,5 +125,5 @@ Will try to convert this to xhyve when possible. # Version Last tested on 2017 October 20th macOS Sierra 10.12.6 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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # Just for demo purposes obviously FROM httpd:2.4-alpine COPY ./index.html /usr/local/apache2/htdocs/ 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ Hello world! 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 charactersOriginal file line number Diff line number Diff line change @@ -10,11 +10,11 @@ spec: replicas: 1 selector: matchLabels: run: my-app-exposed template: metadata: labels: run: my-app-exposed spec: containers: - image: localhost:5000/my-app:0.0.1 @@ -39,5 +39,5 @@ spec: protocol: TCP targetPort: 80 selector: run: my-app-exposed type: NodePort -
kevin-smets revised this gist
Aug 20, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -82,7 +82,7 @@ localhost:5000/my-app latest 44293 my-app latest 442930c9c9fb 2 weeks ago 64.6MB ``` ## Deploy and run Store the file below `my-app.yml` on your system and run the following: -
kevin-smets revised this gist
Aug 10, 2017 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -14,7 +14,7 @@ spec: template: metadata: labels: run: my-app-exposed # must match the selector in the service spec: containers: - image: localhost:5000/my-app:0.0.1 @@ -39,5 +39,5 @@ spec: protocol: TCP targetPort: 80 selector: run: my-app-exposed # must match the label of the pod, otherwise it will not be exposed type: NodePort -
kevin-smets revised this gist
Aug 10, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -123,5 +123,5 @@ Will try to convert this to xhyve when possible. # Version Last tested on 2017 August 10 macOS Sierra 10.12.6 -
kevin-smets renamed this gist
Aug 10, 2017 . 1 changed file with 7 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -57,12 +57,14 @@ e97128790bf9 gcr.io/google-containers/kube-addon-manager "/opt/kube-add 69707e54d1d0 gcr.io/google_containers/pause-amd64:3.0 "/pause" 33 seconds ago Up 33 seconds k8s_POD_kube-addon-manager-minikube_kube-system_c654b2f084cf26941c334a2c3d6db53d_0 ``` # Build, deploy and run an image on your local k8s setup First setup a local registry, so Kubernetes can pull the image(s) from there: docker run -d -p 5000:5000 --restart=always --name registry registry:2 ## Build You can build the Dockerfile below locally if you want to follow this guide to the letter. Store the Dockerfile locally, preferably in an empty directory and run: docker build . --tag my-app @@ -71,7 +73,7 @@ You should now have an image named 'my-app' locally, check by using `docker imag docker tag my-app localhost:5000/my-app:0.0.1 Running `docker images` should now output the following: ``` REPOSITORY TAG IMAGE ID CREATED SIZE @@ -80,6 +82,8 @@ localhost:5000/my-app latest 44293 my-app latest 442930c9c9fb 2 weeks ago 64.6MB ``` ## Deploy an run Store the file below `my-app.yml` on your system and run the following: kubectl create -f my-app.yml -
kevin-smets revised this gist
Aug 10, 2017 . 3 changed files with 127 additions and 106 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ # Just for demo purposes obviously FROM node:8-alpine CMD tail -f /dev/null 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,123 @@ # Requirements Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run: sysctl -a | grep machdep.cpu.features | grep VMX If there's output, you're good! # Prerequisites - kubectl - docker (for Mac) - minikube - virtualbox ``` brew update && brew install kubectl && brew cask install docker minikube virtualbox ``` # Verify docker --version # Docker version 17.06.0-ce, build 02c1d87 docker-compose --version # docker-compose version 1.14.0, build c7bdf9e docker-machine --version # docker-machine version 0.12.0, build 45c69ad minikube version # minikube version: v0.21.0 kubectl version --client # Client Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.3", GitCommit:"2c2fe6e8278a5db2d15a013987b53968c743f2a1", GitTreeState:"clean", BuildDate:"2017-08-03T15:13:53Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"darwin/amd64"} # Start minikube start This can take a while, expected output: Starting local Kubernetes cluster... Kubectl is now configured to use the cluster. Great! You now have a running Kubernetes cluster locally. Minikube started a virtual machine for you, and a Kubernetes cluster is now running in that VM. # Check k8s kubectl get nodes Should output something like: NAME STATUS AGE VERSION minikube Ready 9s v1.7.0 # Use minikube's built-in docker daemon: eval $(minikube docker-env) Running `docker ps` should now output something like: ``` CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES e97128790bf9 gcr.io/google-containers/kube-addon-manager "/opt/kube-addons.sh" 22 seconds ago Up 22 seconds k8s_kube-addon-manager_kube-addon-manager-minikube_kube-system_c654b2f084cf26941c334a2c3d6db53d_0 69707e54d1d0 gcr.io/google_containers/pause-amd64:3.0 "/pause" 33 seconds ago Up 33 seconds k8s_POD_kube-addon-manager-minikube_kube-system_c654b2f084cf26941c334a2c3d6db53d_0 ``` # Deploy and run an image on your local k8s setup First setup a local registry, so Kubernetes can pull the image(s) from there: docker run -d -p 5000:5000 --restart=always --name registry registry:2 You can build the Dockerfile below locally if you want to follow this guide to the letter. Store the Dockerfile locally, preferably in an empty directory and run: docker build . --tag my-app You should now have an image named 'my-app' locally, check by using `docker images` (or your own image of course). You can then publish it to your local docker registry: docker tag my-app localhost:5000/my-app:0.0.1 Runnig `docker images` should now output the following: ``` REPOSITORY TAG IMAGE ID CREATED SIZE node 8-alpine 442930c9c9fb 2 weeks ago 64.6MB localhost:5000/my-app latest 442930c9c9fb 2 weeks ago 64.6MB my-app latest 442930c9c9fb 2 weeks ago 64.6MB ``` Store the file below `my-app.yml` on your system and run the following: kubectl create -f my-app.yml You should now see your pod and your service: kubectl get all The configuration exposes `my-app` outside of the cluster, you can get the address to access it by running: minikube service my-app --url This should give an output like `http://192.168.99.100:30304` (the port will most likely differ). # Kubernetes GUI minikube dashboard # Delete deployment of my-app kubectl delete deploy my-app kubectl delete service my-app You're now good to go and deploy other images! # Reset everything minikube stop; minikube delete; rm -rf ~/.minikube .kube; brew uninstall kubectl; brew cask uninstall docker virtualbox minikube; # TODO Will try to convert this to xhyve when possible. # Version Last tested on 2017 August 10 macOS Sierra 10.12.6 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 charactersOriginal file line number Diff line number Diff line change @@ -1,106 +0,0 @@ -
kevin-smets revised this gist
Aug 8, 2017 . No changes.There are no files selected for viewing
-
kevin-smets revised this gist
Nov 29, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -96,6 +96,7 @@ Then go to `http://<IP>:<PORT>`. # Reset everything minikube stop; minikube delete; rm -rf ~/.minikube .kube; brew uninstall kubectl; brew cask uninstall docker virtualbox minikube; -
kevin-smets revised this gist
Nov 29, 2016 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,9 @@ If there's output, you're good! - minikube - virtualbox ``` brew update && brew install kubectl && brew cask install docker minikube virtualbox ``` # Verify -
kevin-smets revised this gist
Nov 25, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # APP DEPLOYMENT apiVersion: extensions/v1beta1 kind: Deployment @@ -25,7 +25,7 @@ spec: --- # APP SERVICE apiVersion: v1 kind: Service -
kevin-smets renamed this gist
Nov 24, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
kevin-smets revised this gist
Nov 22, 2016 . 2 changed files with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -67,7 +67,7 @@ If you have already built an image, e.g. named 'my-app' locally (check by using Check the two yaml files, and run the following: kubectl create -f my-app.yml You should now see your pod and your service: File renamed without changes. -
kevin-smets revised this gist
Nov 22, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ If there's output, you're good! - minikube - virtualbox brew update && brew install kubectl && brew cask install docker minikube virtualbox # Verify -
kevin-smets revised this gist
Nov 22, 2016 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # APP SERVICE apiVersion: extensions/v1beta1 kind: Deployment @@ -17,15 +17,15 @@ spec: run: my-app spec: containers: - image: localhost:5000/my-app:0.0.1 name: my-app ports: - containerPort: 80 protocol: TCP --- # APP DEPLOYMENT apiVersion: v1 kind: Service @@ -39,5 +39,5 @@ spec: protocol: TCP targetPort: 80 selector: run: app-frontend type: NodePort -
kevin-smets revised this gist
Nov 17, 2016 . 1 changed file with 10 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -6,9 +6,12 @@ Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check th If there's output, you're good! # Prerequisites - kubectl - docker (for Mac) - minikube - virtualbox brew install kubectl; brew cask install docker minikube virtualbox @@ -93,4 +96,8 @@ Then go to `http://<IP>:<PORT>`. minikube stop; rm -rf ~/.minikube .kube; brew uninstall kubectl; brew cask uninstall docker virtualbox minikube; # TODO Will try to convert this to xhyve when possible. -
kevin-smets revised this gist
Nov 17, 2016 . No changes.There are no files selected for viewing
-
kevin-smets revised this gist
Nov 17, 2016 . 4 changed files with 52 additions and 35 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -64,12 +64,17 @@ If you have already built an image, e.g. named 'my-app' locally (check by using Check the two yaml files, and run the following: kubectl create -f app.yml You should now see your pod and your service: kubectl get all The configuration exposes `my-app` outside of the cluster, you can get the address to access it by running: minikube service my-app --url This should give an output like `http://192.168.99.100:30304` (the port will most likely differ). # Kubernetes GUI 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 charactersOriginal file line number Diff line number Diff line change @@ -1,17 +0,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 charactersOriginal file line number Diff line number Diff line change @@ -1,14 +0,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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,43 @@ # MY APP DEPLOYMENT apiVersion: extensions/v1beta1 kind: Deployment metadata: labels: run: my-app name: my-app spec: replicas: 1 selector: matchLabels: run: my-app template: metadata: labels: run: my-app spec: containers: - image: localhost:5000/my-app name: my-app ports: - containerPort: 80 protocol: TCP --- # MY APP SERVICE apiVersion: v1 kind: Service metadata: labels: run: my-app name: my-app spec: ports: - port: 80 protocol: TCP targetPort: 80 selector: run: my-app type: NodePort -
kevin-smets revised this gist
Nov 14, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -81,8 +81,8 @@ Get the port: kubectl get svc kubernetes-dashboard -o json --namespace=kube-system | grep nodePort Then go to `http://<IP>:<PORT>`. # Reset everything minikube stop; -
kevin-smets revised this gist
Nov 14, 2016 . 1 changed file with 12 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -71,6 +71,18 @@ You should now see your pods: kubectl get pods # Kubernetes GUI Get the IP: kubectl describe nodes | grep Addresses Get the port: kubectl get svc kubernetes-dashboard -o json --namespace=kube-system | grep nodePort Then go to http://<IP>:<PORT> # Reset everything minikube stop; -
kevin-smets revised this gist
Nov 14, 2016 . No changes.There are no files selected for viewing
-
kevin-smets revised this gist
Nov 14, 2016 . 2 changed files with 31 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: name: app spec: replicas: 2 template: metadata: labels: name: my-app-deployment spec: containers: - image: localhost:5000/my-app:1.0 name: app ports: - name: app-server containerPort: 8080 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ apiVersion: v1 kind: Service metadata: name: app labels: name: my-app-service spec: type: LoadBalancer ports: - port: 8080 targetPort: 8081 protocol: TCP selector: name: my-app -
kevin-smets renamed this gist
Nov 14, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
kevin-smets revised this gist
Nov 14, 2016 . 1 changed file with 19 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -52,6 +52,25 @@ Running `docker ps` should now output something like: 332c645bb167 gcr.io/google-containers/kube-addon-manager:v5.1 "/opt/kube-addons.sh" 35 minutes ago Up 35 minutes k8s_kube-addon-manager.92e38b3b_kube-addon-manager-minikube_kube-system_46ae05e07c52d84167b077b142aa4a39_253f9280 8ea2cd68e0a8 gcr.io/google_containers/pause-amd64:3.0 "/pause" 35 minutes ago Up 35 minutes k8s_POD.d8dbe16c_kube-addon-manager-minikube_kube-system_46ae05e07c52d84167b077b142aa4a39_da8bd6f9 # Deploy and run an image on your local k8s setup First setup a local registry, so Kubernetes can pull the image(s) from there: docker run -d -p 5000:5000 --restart=always --name registry registry:2 If you have already built an image, e.g. named 'my-app' locally (check by using `docker images`), you can publish it to your local repo: docker tag my-app localhost:5000/my-app Check the two yaml files, and run the following: kubectl create -f app-deployment.yml kubectl create -f app-service.yml You should now see your pods: kubectl get pods # Reset everything minikube stop;
NewerOlder