Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
e3a2f0ed
Commit
e3a2f0ed
authored
Dec 09, 2015
by
Filip Grzadkowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change instruction for Mac OS X users running local docker cluster.
parent
439019cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
25 deletions
+8
-25
docker.md
docs/getting-started-guides/docker.md
+8
-25
No files found.
docs/getting-started-guides/docker.md
View file @
e3a2f0ed
...
@@ -118,7 +118,7 @@ This actually runs the kubelet, which in turn runs a [pod](../user-guide/pods.md
...
@@ -118,7 +118,7 @@ This actually runs the kubelet, which in turn runs a [pod](../user-guide/pods.md
docker run
-d
--net
=
host
--privileged
gcr.io/google_containers/hyperkube:v
${
K8S_VERSION
}
/hyperkube proxy
--master
=
http://127.0.0.1:8080
--v
=
2
docker run
-d
--net
=
host
--privileged
gcr.io/google_containers/hyperkube:v
${
K8S_VERSION
}
/hyperkube proxy
--master
=
http://127.0.0.1:8080
--v
=
2
```
```
###
Test it out
###
Download ```kubectl```
At this point you should have a running Kubernetes cluster. You can test this
At this point you should have a running Kubernetes cluster. You can test this
by downloading the kubectl binary for
`${K8S_VERSION}`
(look at the URL in the
by downloading the kubectl binary for
`${K8S_VERSION}`
(look at the URL in the
...
@@ -143,32 +143,17 @@ $ chmod 755 kubectl
...
@@ -143,32 +143,17 @@ $ chmod 755 kubectl
$
PATH
=
$PATH
:
`
pwd
`
$
PATH
=
$PATH
:
`
pwd
`
```
```
<hr>
Create configuration:
**Note for OS/X users:**
You will need to set up port forwarding via ssh. For users still using boot2docker directly, it is enough to run the command:
```
sh
boot2docker ssh
-L8080
:localhost:8080
```
Since the recent deprecation of boot2docker/osx-installer, the correct way to solve the problem is to issue
```
sh
docker-machine ssh default
-L
8080:localhost:8080
```
```
$ kubectl config set-cluster test-doc --server=http://localhost:8080
However, this solution works only from docker-machine version 0.5. For older versions of docker-machine, a workaround is the
$ kubectl config set-context test-doc --cluster=test-doc
following:
$ kubectl config use-context test-doc
```
sh
docker-machine
env
default
ssh
-f
-T
-N
-L8080
:localhost:8080
-l
docker
$(
echo
$DOCKER_HOST
|
cut
-d
':'
-f
2 |
tr
-d
'/'
)
```
```
Type
`tcuser`
as the password
.
For Max OS X users instead of
```localhost```
you will have to use IP address of your docker machine
.
<hr>
### Test it out
List the nodes in your cluster by running:
List the nodes in your cluster by running:
...
@@ -183,12 +168,10 @@ NAME LABELS STATUS
...
@@ -183,12 +168,10 @@ NAME LABELS STATUS
127.0.0.1 kubernetes.io/hostname=127.0.0.1 Ready
127.0.0.1 kubernetes.io/hostname=127.0.0.1 Ready
```
```
If you are running different Kubernetes clusters, you may need to specify
`-s http://localhost:8080`
to select the local cluster.
### Run an application
### Run an application
```
sh
```
sh
kubectl
-s
http://localhost:8080
run nginx
--image
=
nginx
--port
=
80
kubectl run nginx
--image
=
nginx
--port
=
80
```
```
Now run
`docker ps`
you should see nginx running. You may need to wait a few minutes for the image to get pulled.
Now run
`docker ps`
you should see nginx running. You may need to wait a few minutes for the image to get pulled.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment