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
ece25d03
Commit
ece25d03
authored
Jul 19, 2015
by
Satnam Singh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix output formatting for Getting Into Containers doc
parent
715f2c48
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
getting-into-containers.md
docs/user-guide/getting-into-containers.md
+7
-7
No files found.
docs/user-guide/getting-into-containers.md
View file @
ece25d03
...
@@ -40,14 +40,14 @@ Kubernetes exposes [services](services.md#environment-variables) through environ
...
@@ -40,14 +40,14 @@ Kubernetes exposes [services](services.md#environment-variables) through environ
We first create a pod and a service,
We first create a pod and a service,
```
```
console
$
kubectl create
-f
examples/guestbook/redis-master-controller.yaml
$
kubectl create
-f
examples/guestbook/redis-master-controller.yaml
$
kubectl create
-f
examples/guestbook/redis-master-service.yaml
$
kubectl create
-f
examples/guestbook/redis-master-service.yaml
```
```
wait until the pod is Running and Ready,
wait until the pod is Running and Ready,
```
```
console
$
kubectl get pod
$
kubectl get pod
NAME READY REASON RESTARTS AGE
NAME READY REASON RESTARTS AGE
redis-master-ft9ex 1/1 Running 0 12s
redis-master-ft9ex 1/1 Running 0 12s
...
@@ -55,7 +55,7 @@ redis-master-ft9ex 1/1 Running 0 12s
...
@@ -55,7 +55,7 @@ redis-master-ft9ex 1/1 Running 0 12s
then we can check the environment variables of the pod,
then we can check the environment variables of the pod,
```
```
console
$
kubectl
exec
redis-master-ft9ex
env
$
kubectl
exec
redis-master-ft9ex
env
...
...
REDIS_MASTER_SERVICE_PORT=6379
REDIS_MASTER_SERVICE_PORT=6379
...
@@ -71,13 +71,13 @@ We can use these environment variables in applications to find the service.
...
@@ -71,13 +71,13 @@ We can use these environment variables in applications to find the service.
It is convenient to use
`kubectl exec`
to check if the volumes are mounted as expected.
It is convenient to use
`kubectl exec`
to check if the volumes are mounted as expected.
We first create a Pod with a volume mounted at /data/redis,
We first create a Pod with a volume mounted at /data/redis,
```
```
console
kubectl create -f docs/user-guide/walkthrough/pod-redis.yaml
kubectl create -f docs/user-guide/walkthrough/pod-redis.yaml
```
```
wait until the pod is Running and Ready,
wait until the pod is Running and Ready,
```
```
console
$
kubectl get pods
$
kubectl get pods
NAME READY REASON RESTARTS AGE
NAME READY REASON RESTARTS AGE
storage 1/1 Running 0 1m
storage 1/1 Running 0 1m
...
@@ -85,7 +85,7 @@ storage 1/1 Running 0 1m
...
@@ -85,7 +85,7 @@ storage 1/1 Running 0 1m
we then use
`kubectl exec`
to verify that the volume is mounted at /data/redis,
we then use
`kubectl exec`
to verify that the volume is mounted at /data/redis,
```
```
console
$
kubectl
exec
storage
ls
/data
$
kubectl
exec
storage
ls
/data
redis
redis
```
```
...
@@ -94,7 +94,7 @@ redis
...
@@ -94,7 +94,7 @@ redis
After all, open a terminal in a pod is the most direct way to introspect the pod. Assuming the pod/storage is still running, run
After all, open a terminal in a pod is the most direct way to introspect the pod. Assuming the pod/storage is still running, run
```
```
console
$
kubectl
exec
-ti
storage
--
bash
$
kubectl
exec
-ti
storage
--
bash
root@storage:/data#
root@storage:/data#
```
```
...
...
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