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
46621b25
Commit
46621b25
authored
Jun 11, 2015
by
Abhi Shah
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9640 from caesarxuchao/single-files-examples-v1
update the single files in examples/ to v1
parents
33cd4c40
5abf6ce7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
31 deletions
+14
-31
pod.yaml
examples/pod.yaml
+4
-9
replication.yaml
examples/replication.yaml
+3
-7
simple-yaml.md
examples/simple-yaml.md
+7
-15
No files found.
examples/pod.yaml
View file @
46621b25
apiVersion
:
v1
beta3
apiVersion
:
v1
kind
:
Pod
metadata
:
name
:
nginx
labels
:
name
:
nginx
name
:
nginx
namespace
:
default
spec
:
containers
:
-
image
:
nginx
imagePullPolicy
:
IfNotPresent
name
:
nginx
-
name
:
nginx
image
:
nginx
ports
:
-
containerPort
:
80
protocol
:
TCP
restartPolicy
:
Always
\ No newline at end of file
examples/replication.yaml
View file @
46621b25
apiVersion
:
v1
beta3
apiVersion
:
v1
kind
:
ReplicationController
metadata
:
name
:
nginx
namespace
:
default
spec
:
replicas
:
3
selector
:
...
...
@@ -14,10 +13,7 @@ spec:
app
:
nginx
spec
:
containers
:
-
image
:
nginx
imagePullPolicy
:
IfNotPresent
name
:
nginx
-
name
:
nginx
image
:
nginx
ports
:
-
containerPort
:
80
protocol
:
TCP
restartPolicy
:
Always
examples/simple-yaml.md
View file @
46621b25
...
...
@@ -15,22 +15,18 @@ kubectl create -f pod.yaml
Where pod.yaml contains something like:
```
yaml
apiVersion
:
v1
beta3
apiVersion
:
v1
kind
:
Pod
metadata
:
name
:
nginx
labels
:
app
:
nginx
name
:
nginx
namespace
:
default
spec
:
containers
:
-
image
:
nginx
imagePullPolicy
:
IfNotPresent
name
:
nginx
-
name
:
nginx
image
:
nginx
ports
:
-
containerPort
:
80
protocol
:
TCP
restartPolicy
:
Always
```
You can see your cluster's pods:
...
...
@@ -58,11 +54,10 @@ kubectl create -f replication.yaml
Where
```replication.yaml```
contains:
```
yaml
apiVersion
:
v1
beta3
apiVersion
:
v1
kind
:
ReplicationController
metadata
:
name
:
nginx
namespace
:
default
spec
:
replicas
:
3
selector
:
...
...
@@ -74,13 +69,10 @@ spec:
app
:
nginx
spec
:
containers
:
-
image
:
nginx
imagePullPolicy
:
IfNotPresent
name
:
nginx
-
name
:
nginx
image
:
nginx
ports
:
-
containerPort
:
80
protocol
:
TCP
restartPolicy
:
Always
```
To delete the replication controller (and the pods it created):
...
...
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