You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
==> The following existing directories will be made group writable:
/usr/local/bin
$ brew install docker-machine-driver-xhyve
Error: Xcode alone is not sufficient on Sierra.
Install the Command Line Tools:
xcode-select --install
install xcode-select tools
$ xcode-select --install
xcode-select: note: install requested for command line developer tools
$
(retry) install xhyve
$ brew install docker-machine-driver-xhyve
==> Installing dependencies for docker-machine-driver-xhyve: docker-machine, libev
==> Installing docker-machine-driver-xhyve dependency: docker-machine
==> Downloading https://homebrew.bintray.com/bottles/docker-machine-0.13.0.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring docker-machine-0.13.0.sierra.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/docker-machine
Target /usr/local/bin/docker-machine
already exists. You may want to remove it:
rm '/usr/local/bin/docker-machine'
To force the link and overwrite all conflicting files:
brew link --overwrite docker-machine
To list all files that would be deleted:
brew link --overwrite --dry-run docker-machine
Possible conflicting files are:
/usr/local/bin/docker-machine -> /Users/<username>/Library/Group Containers/group.com.docker/bin/docker-machine
==> Caveats
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
zsh completions have been installed to:
/usr/local/share/zsh/site-functions
To have launchd start docker-machine now and restart at login:
brew services start docker-machine
Or, if you don't want/need a background service you can just run:
docker-machine start
$ minikube start --vm-driver=xhyve
Starting local Kubernetes v1.8.0 cluster...
Starting VM...
Downloading Minikube ISO
140.01 MB / 140.01 MB [============================================] 100.00% 0s
Getting VM IP address...
Moving files into cluster...
Downloading localkube binary
148.56 MB / 148.56 MB [============================================] 100.00% 0s
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
Kubectl is now configured to use the cluster.
kubectl config use-context
$ kubectl config use-context minikube
Switched to context "minikube".
$ kubectl cluster-info
Kubernetes master is running at https://192.168.64.2:8443
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
deploy
"Dockerfile" [New] 4L, 64C written
$ eval $(minikube docker-env)
$ docker build -t hello-node:v1 .
Sending build context to Docker daemon 3.072kB
Step 1/4 : FROM node:6.9.2
6.9.2: Pulling from library/node
75a822cd7888: Pull complete
57de64c72267: Pull complete
4306be1e8943: Pull complete
871436ab7225: Pull complete
0110c26a367a: Pull complete
1f04fe713f1b: Pull complete
ac7c0b5fb553: Pull complete
Digest: sha256:2e95be60faf429d6c97d928c762cb36f1940f4456ce4bd33fbdc34de94a5e043
Status: Downloaded newer image for node:6.9.2
---> faaadb4aaf9b
Step 2/4 : EXPOSE 8080
---> Running in 896f38462c5f
---> 5f2c21252dcf
Removing intermediate container 896f38462c5f
Step 3/4 : COPY server.js .
---> 1faa21ff036f
Removing intermediate container f24af46167fc
Step 4/4 : CMD node server.js
---> Running in 576710dd2c5f
---> f9e2195c4ad7
Removing intermediate container 576710dd2c5f
Successfully built f9e2195c4ad7
Successfully tagged hello-node:v1
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-node v1 f9e2195c4ad7 11 seconds ago 655MB
gcr.io/google_containers/k8s-dns-sidecar-amd64 1.14.5 fed89e8b4248 8 weeks ago 41.8MB
gcr.io/google_containers/k8s-dns-kube-dns-amd64 1.14.5 512cd7425a73 8 weeks ago 49.4MB
gcr.io/google_containers/k8s-dns-dnsmasq-nanny-amd64 1.14.5 459944ce8cc4 8 weeks ago 41.4MB
gcr.io/google_containers/kubernetes-dashboard-amd64 v1.7.0 284ec2f8ed6c 2 months ago 128MB
gcr.io/google_containers/kubernetes-dashboard-amd64 v1.6.3 691a82db1ecd 3 months ago 139MB
gcr.io/google-containers/kube-addon-manager v6.4-beta.2 0a951668696f 5 months ago 79.2MB
node 6.9.2 faaadb4aaf9b 11 months ago 655MB
gcr.io/google_containers/pause-amd64 3.0 99e59f495ffa 18 months ago 747kB
$ kubectl run hello-node --image=hello-node:v1 --port=8080
deployment "hello-node" created
$ kubectl get deployments
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
hello-node 1 1 1 1 11s
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
hello-node-69b47b745c-k8jx2 1/1 Running 0 23s
$ kubectl get events
LAST SEEN FIRST SEEN COUNT NAME KIND SUBOBJECT TYPE REASON SOURCE MESSAGE
37s 37s 1 hello-node-69b47b745c-k8jx2.14f99e59f0bd70f8 Pod Normal Scheduled default-scheduler Successfully assigned hello-node-69b47b745c-k8jx2 to minikube
37s 37s 1 hello-node-69b47b745c-k8jx2.14f99e59fda3d7a0 Pod Normal SuccessfulMountVolume kubelet, minikube MountVolume.SetUp succeeded for volume "default-token-fxccs"
36s 36s 1 hello-node-69b47b745c-k8jx2.14f99e5a2f6777bb Pod spec.containers{hello-node} Normal Pulled kubelet, minikube Container image "hello-node:v1" already present on machine
36s 36s 1 hello-node-69b47b745c-k8jx2.14f99e5a3b3cbc3d Pod spec.containers{hello-node} Normal Created kubelet, minikube Created container
36s 36s 1 hello-node-69b47b745c-k8jx2.14f99e5a42d5346e Pod spec.containers{hello-node} Normal Started kubelet, minikube Started container
37s 37s 1 hello-node-69b47b745c.14f99e59eee9d0ec ReplicaSet Normal SuccessfulCreate replicaset-controller Created pod: hello-node-69b47b745c-k8jx2
38s 38s 1 hello-node.14f99e59ea9b1625 Deployment Normal ScalingReplicaSet deployment-controller Scaled up replica set hello-node-69b47b745c to 1
10m 10m 1 minikube.14f99dd36517528f Node Normal Starting kubelet, minikube Starting kubelet.
10m 10m 2 minikube.14f99dd36602fd57 Node Normal NodeHasSufficientDisk kubelet, minikube Node minikube status is now: NodeHasSufficientDisk
10m 10m 2 minikube.14f99dd366031264 Node Normal NodeHasSufficientMemory kubelet, minikube Node minikube status is now: NodeHasSufficientMemory
10m 10m 2 minikube.14f99dd366031cc1 Node Normal NodeHasNoDiskPressure kubelet, minikube Node minikube status is now: NodeHasNoDiskPressure
10m 10m 1 minikube.14f99dd36710ae51 Node Normal NodeAllocatableEnforced kubelet, minikube Updated Node Allocatable limit across pods
10m 10m 1 minikube.14f99dd37cd28054 Node Normal NodeReady kubelet, minikube Node minikube status is now: NodeReady
10m 10m 1 minikube.14f99dd38897f914 Node Normal Starting kube-proxy, minikube Starting kube-proxy.
15s 10m 11 minikube.14f99dd3889e4ab6 Node Warning FailedToStartNodeHealthcheck kube-proxy, minikube Failed to start node healthz on 0: listen tcp: address 0: missing port in address
10m 10m 1 minikube.14f99dd43978a7ed Node Normal RegisteredNode controllermanager Node minikube event: Registered Node minikube in Controller
$ kubectl config view
apiVersion: v1
clusters:
- cluster:
certificate-authority: /Users/<username>/.minikube/ca.crt
server: https://192.168.64.2:8443
name: minikube
contexts:
- context:
cluster: minikube
user: minikube
name: minikube
current-context: minikube
kind: Config
preferences: {}
users:
- name: minikube
user:
client-certificate: /Users/<username>/.minikube/client.crt
client-key: /Users/<username>/.minikube/client.key
$
update and deploy new version of service
$ docker build -t hello-node:v2 .
Sending build context to Docker daemon 3.072kB
Step 1/4 : FROM node:6.9.2
---> faaadb4aaf9b
Step 2/4 : EXPOSE 8080
---> Using cache
---> 5f2c21252dcf
Step 3/4 : COPY server.js .
---> 8d9f1f3ba177
Removing intermediate container 4e6873a99a5d
Step 4/4 : CMD node server.js
---> Running in 5c43ab049419
---> 084c07b9c675
Removing intermediate container 5c43ab049419
Successfully built 084c07b9c675
Successfully tagged hello-node:v2
$ kubectl set image deployment/hello-node hello-node=hello-node:v2
deployment "hello-node" image updated
$ minikube service hello-node
Opening kubernetes service default/hello-node in default browser...
cleanup
$ kubectl delete service hello-node
service "hello-node" deleted
$ kubectl delete deployment hello-node
deployment "hello-node" deleted
$ minikube stop
Stopping local Kubernetes cluster...
Machine stopped.
the is deprecated and is not working anymore :/