mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 22:17:14 +00:00
Merge pull request #54342 from mkumatag/cleanup_test
Automatic merge from submit-queue (batch tested with PRs 52556, 52897, 54342). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Delete unused yaml files **What this PR does / why we need it**: This PR is for removing some of these unused yaml files copied earlier from doc dir. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #54447 **Special notes for your reviewer**: **Release note**: ```NONE ```
This commit is contained in:
commit
fbd570c862
@ -1,142 +0,0 @@
|
|||||||
#cloud-config
|
|
||||||
|
|
||||||
---
|
|
||||||
write-files:
|
|
||||||
- path: /etc/conf.d/nfs
|
|
||||||
permissions: '0644'
|
|
||||||
content: |
|
|
||||||
OPTS_RPC_MOUNTD=""
|
|
||||||
- path: /opt/bin/wupiao
|
|
||||||
permissions: '0755'
|
|
||||||
content: |
|
|
||||||
#!/bin/bash
|
|
||||||
# [w]ait [u]ntil [p]ort [i]s [a]ctually [o]pen
|
|
||||||
[ -n "$1" ] && \
|
|
||||||
until curl -o /dev/null -sIf http://${1}; do \
|
|
||||||
sleep 1 && echo .;
|
|
||||||
done;
|
|
||||||
exit $?
|
|
||||||
|
|
||||||
hostname: master
|
|
||||||
coreos:
|
|
||||||
etcd2:
|
|
||||||
name: master
|
|
||||||
listen-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001
|
|
||||||
advertise-client-urls: http://$private_ipv4:2379,http://$private_ipv4:4001
|
|
||||||
initial-cluster-token: k8s_etcd
|
|
||||||
listen-peer-urls: http://$private_ipv4:2380,http://$private_ipv4:7001
|
|
||||||
initial-advertise-peer-urls: http://$private_ipv4:2380
|
|
||||||
initial-cluster: master=http://$private_ipv4:2380
|
|
||||||
initial-cluster-state: new
|
|
||||||
fleet:
|
|
||||||
metadata: "role=master"
|
|
||||||
units:
|
|
||||||
- name: etcd2.service
|
|
||||||
command: start
|
|
||||||
- name: generate-serviceaccount-key.service
|
|
||||||
command: start
|
|
||||||
content: |
|
|
||||||
[Unit]
|
|
||||||
Description=Generate service-account key file
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStartPre=-/usr/bin/mkdir -p /opt/bin
|
|
||||||
ExecStart=/bin/openssl genrsa -out /opt/bin/kube-serviceaccount.key 2048 2>/dev/null
|
|
||||||
RemainAfterExit=yes
|
|
||||||
Type=oneshot
|
|
||||||
- name: setup-network-environment.service
|
|
||||||
command: start
|
|
||||||
content: |
|
|
||||||
[Unit]
|
|
||||||
Description=Setup Network Environment
|
|
||||||
Documentation=https://github.com/kelseyhightower/setup-network-environment
|
|
||||||
Requires=network-online.target
|
|
||||||
After=network-online.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStartPre=-/usr/bin/mkdir -p /opt/bin
|
|
||||||
ExecStartPre=/usr/bin/curl -L -o /opt/bin/setup-network-environment -z /opt/bin/setup-network-environment https://github.com/kelseyhightower/setup-network-environment/releases/download/v1.0.0/setup-network-environment
|
|
||||||
ExecStartPre=/usr/bin/chmod +x /opt/bin/setup-network-environment
|
|
||||||
ExecStart=/opt/bin/setup-network-environment
|
|
||||||
RemainAfterExit=yes
|
|
||||||
Type=oneshot
|
|
||||||
- name: fleet.service
|
|
||||||
command: start
|
|
||||||
- name: flanneld.service
|
|
||||||
command: start
|
|
||||||
drop-ins:
|
|
||||||
- name: 50-network-config.conf
|
|
||||||
content: |
|
|
||||||
[Unit]
|
|
||||||
Requires=etcd2.service
|
|
||||||
[Service]
|
|
||||||
ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{"Network":"10.244.0.0/16", "Backend": {"Type": "vxlan"}}'
|
|
||||||
- name: docker.service
|
|
||||||
command: start
|
|
||||||
- name: kube-apiserver.service
|
|
||||||
command: start
|
|
||||||
content: |
|
|
||||||
[Unit]
|
|
||||||
Description=Kubernetes API Server
|
|
||||||
Documentation=https://github.com/kubernetes/kubernetes
|
|
||||||
Requires=setup-network-environment.service etcd2.service generate-serviceaccount-key.service
|
|
||||||
After=setup-network-environment.service etcd2.service generate-serviceaccount-key.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
EnvironmentFile=/etc/network-environment
|
|
||||||
ExecStartPre=-/usr/bin/mkdir -p /opt/bin
|
|
||||||
ExecStartPre=/usr/bin/curl -L -o /opt/bin/kube-apiserver -z /opt/bin/kube-apiserver https://storage.googleapis.com/kubernetes-release/release/v1.1.2/bin/linux/amd64/kube-apiserver
|
|
||||||
ExecStartPre=/usr/bin/chmod +x /opt/bin/kube-apiserver
|
|
||||||
ExecStartPre=/opt/bin/wupiao 127.0.0.1:2379/v2/machines
|
|
||||||
ExecStart=/opt/bin/kube-apiserver \
|
|
||||||
--service-account-key-file=/opt/bin/kube-serviceaccount.key \
|
|
||||||
--service-account-lookup=true \
|
|
||||||
--admission-control=Initializers,NamespaceLifecycle,NamespaceAutoProvision,LimitRanger,SecurityContextDeny,ServiceAccount,ResourceQuota \
|
|
||||||
--runtime-config=api/v1 \
|
|
||||||
--allow-privileged=true \
|
|
||||||
--insecure-bind-address=0.0.0.0 \
|
|
||||||
--insecure-port=8080 \
|
|
||||||
--kubelet-https=true \
|
|
||||||
--secure-port=6443 \
|
|
||||||
--service-cluster-ip-range=10.100.0.0/16 \
|
|
||||||
--etcd-servers=http://127.0.0.1:2379 \
|
|
||||||
--public-address-override=${DEFAULT_IPV4} \
|
|
||||||
--logtostderr=true
|
|
||||||
Restart=always
|
|
||||||
RestartSec=10
|
|
||||||
- name: kube-controller-manager.service
|
|
||||||
command: start
|
|
||||||
content: |
|
|
||||||
[Unit]
|
|
||||||
Description=Kubernetes Controller Manager
|
|
||||||
Documentation=https://github.com/kubernetes/kubernetes
|
|
||||||
Requires=kube-apiserver.service
|
|
||||||
After=kube-apiserver.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStartPre=/usr/bin/curl -L -o /opt/bin/kube-controller-manager -z /opt/bin/kube-controller-manager https://storage.googleapis.com/kubernetes-release/release/v1.1.2/bin/linux/amd64/kube-controller-manager
|
|
||||||
ExecStartPre=/usr/bin/chmod +x /opt/bin/kube-controller-manager
|
|
||||||
ExecStart=/opt/bin/kube-controller-manager \
|
|
||||||
--service-account-private-key-file=/opt/bin/kube-serviceaccount.key \
|
|
||||||
--master=127.0.0.1:8080 \
|
|
||||||
--logtostderr=true
|
|
||||||
Restart=always
|
|
||||||
RestartSec=10
|
|
||||||
- name: kube-scheduler.service
|
|
||||||
command: start
|
|
||||||
content: |
|
|
||||||
[Unit]
|
|
||||||
Description=Kubernetes Scheduler
|
|
||||||
Documentation=https://github.com/kubernetes/kubernetes
|
|
||||||
Requires=kube-apiserver.service
|
|
||||||
After=kube-apiserver.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStartPre=/usr/bin/curl -L -o /opt/bin/kube-scheduler -z /opt/bin/kube-scheduler https://storage.googleapis.com/kubernetes-release/release/v1.1.2/bin/linux/amd64/kube-scheduler
|
|
||||||
ExecStartPre=/usr/bin/chmod +x /opt/bin/kube-scheduler
|
|
||||||
ExecStart=/opt/bin/kube-scheduler --master=127.0.0.1:8080
|
|
||||||
Restart=always
|
|
||||||
RestartSec=10
|
|
||||||
update:
|
|
||||||
group: alpha
|
|
||||||
reboot-strategy: off
|
|
@ -1,93 +0,0 @@
|
|||||||
#cloud-config
|
|
||||||
write-files:
|
|
||||||
- path: /opt/bin/wupiao
|
|
||||||
permissions: '0755'
|
|
||||||
content: |
|
|
||||||
#!/bin/bash
|
|
||||||
# [w]ait [u]ntil [p]ort [i]s [a]ctually [o]pen
|
|
||||||
[ -n "$1" ] && [ -n "$2" ] && while ! curl --output /dev/null \
|
|
||||||
--silent --head --fail \
|
|
||||||
http://${1}:${2}; do sleep 1 && echo -n .; done;
|
|
||||||
exit $?
|
|
||||||
coreos:
|
|
||||||
etcd2:
|
|
||||||
listen-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001
|
|
||||||
advertise-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001
|
|
||||||
initial-cluster: master=http://<master-private-ip>:2380
|
|
||||||
proxy: on
|
|
||||||
fleet:
|
|
||||||
metadata: "role=node"
|
|
||||||
units:
|
|
||||||
- name: etcd2.service
|
|
||||||
command: start
|
|
||||||
- name: fleet.service
|
|
||||||
command: start
|
|
||||||
- name: flanneld.service
|
|
||||||
command: start
|
|
||||||
- name: docker.service
|
|
||||||
command: start
|
|
||||||
- name: setup-network-environment.service
|
|
||||||
command: start
|
|
||||||
content: |
|
|
||||||
[Unit]
|
|
||||||
Description=Setup Network Environment
|
|
||||||
Documentation=https://github.com/kelseyhightower/setup-network-environment
|
|
||||||
Requires=network-online.target
|
|
||||||
After=network-online.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStartPre=-/usr/bin/mkdir -p /opt/bin
|
|
||||||
ExecStartPre=/usr/bin/curl -L -o /opt/bin/setup-network-environment -z /opt/bin/setup-network-environment https://github.com/kelseyhightower/setup-network-environment/releases/download/v1.0.0/setup-network-environment
|
|
||||||
ExecStartPre=/usr/bin/chmod +x /opt/bin/setup-network-environment
|
|
||||||
ExecStart=/opt/bin/setup-network-environment
|
|
||||||
RemainAfterExit=yes
|
|
||||||
Type=oneshot
|
|
||||||
- name: kube-proxy.service
|
|
||||||
command: start
|
|
||||||
content: |
|
|
||||||
[Unit]
|
|
||||||
Description=Kubernetes Proxy
|
|
||||||
Documentation=https://github.com/kubernetes/kubernetes
|
|
||||||
Requires=setup-network-environment.service
|
|
||||||
After=setup-network-environment.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStartPre=/usr/bin/curl -L -o /opt/bin/kube-proxy -z /opt/bin/kube-proxy https://storage.googleapis.com/kubernetes-release/release/v1.1.2/bin/linux/amd64/kube-proxy
|
|
||||||
ExecStartPre=/usr/bin/chmod +x /opt/bin/kube-proxy
|
|
||||||
# wait for kubernetes master to be up and ready
|
|
||||||
ExecStartPre=/opt/bin/wupiao <master-private-ip> 8080
|
|
||||||
ExecStart=/opt/bin/kube-proxy \
|
|
||||||
--master=<master-private-ip>:8080 \
|
|
||||||
--logtostderr=true
|
|
||||||
Restart=always
|
|
||||||
RestartSec=10
|
|
||||||
- name: kube-kubelet.service
|
|
||||||
command: start
|
|
||||||
content: |
|
|
||||||
[Unit]
|
|
||||||
Description=Kubernetes Kubelet
|
|
||||||
Documentation=https://github.com/kubernetes/kubernetes
|
|
||||||
Requires=setup-network-environment.service
|
|
||||||
After=setup-network-environment.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
EnvironmentFile=/etc/network-environment
|
|
||||||
ExecStartPre=/usr/bin/curl -L -o /opt/bin/kubelet -z /opt/bin/kubelet https://storage.googleapis.com/kubernetes-release/release/v1.1.2/bin/linux/amd64/kubelet
|
|
||||||
ExecStartPre=/usr/bin/chmod +x /opt/bin/kubelet
|
|
||||||
# wait for kubernetes master to be up and ready
|
|
||||||
ExecStartPre=/opt/bin/wupiao <master-private-ip> 8080
|
|
||||||
ExecStart=/opt/bin/kubelet \
|
|
||||||
--address=0.0.0.0 \
|
|
||||||
--port=10250 \
|
|
||||||
--hostname-override=${DEFAULT_IPV4} \
|
|
||||||
--api-servers=<master-private-ip>:8080 \
|
|
||||||
--allow-privileged=true \
|
|
||||||
--logtostderr=true \
|
|
||||||
--cadvisor-port=4194 \
|
|
||||||
--healthz-bind-address=0.0.0.0 \
|
|
||||||
--healthz-port=10248
|
|
||||||
Restart=always
|
|
||||||
RestartSec=10
|
|
||||||
update:
|
|
||||||
group: alpha
|
|
||||||
reboot-strategy: off
|
|
@ -1,21 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Pod
|
|
||||||
metadata:
|
|
||||||
name: config-cmd-test-pod
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: test-container
|
|
||||||
image: gcr.io/google_containers/busybox
|
|
||||||
command: [ "/bin/sh", "-c", "echo $(KUBE_CONFIG_1) $(KUBE_CONFIG_2)" ]
|
|
||||||
env:
|
|
||||||
- name: KUBE_CONFIG_1
|
|
||||||
valueFrom:
|
|
||||||
configMapKeyRef:
|
|
||||||
name: test-configmap
|
|
||||||
key: data-1
|
|
||||||
- name: KUBE_CONFIG_2
|
|
||||||
valueFrom:
|
|
||||||
configMapKeyRef:
|
|
||||||
name: test-configmap
|
|
||||||
key: data-2
|
|
||||||
restartPolicy: Never
|
|
@ -1,21 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Pod
|
|
||||||
metadata:
|
|
||||||
name: config-env-test-pod
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: test-container
|
|
||||||
image: gcr.io/google_containers/busybox
|
|
||||||
command: [ "/bin/sh", "-c", "env" ]
|
|
||||||
env:
|
|
||||||
- name: KUBE_CONFIG_1
|
|
||||||
valueFrom:
|
|
||||||
configMapKeyRef:
|
|
||||||
name: test-configmap
|
|
||||||
key: data-1
|
|
||||||
- name: KUBE_CONFIG_2
|
|
||||||
valueFrom:
|
|
||||||
configMapKeyRef:
|
|
||||||
name: test-configmap
|
|
||||||
key: data-2
|
|
||||||
restartPolicy: Never
|
|
@ -1,30 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Pod
|
|
||||||
metadata:
|
|
||||||
name: redis
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: redis
|
|
||||||
image: kubernetes/redis:v1
|
|
||||||
env:
|
|
||||||
- name: MASTER
|
|
||||||
value: "true"
|
|
||||||
ports:
|
|
||||||
- containerPort: 6379
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: "0.1"
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: /redis-master-data
|
|
||||||
name: data
|
|
||||||
- mountPath: /redis-master
|
|
||||||
name: config
|
|
||||||
volumes:
|
|
||||||
- name: data
|
|
||||||
emptyDir: {}
|
|
||||||
- name: config
|
|
||||||
configMap:
|
|
||||||
name: example-redis-config
|
|
||||||
items:
|
|
||||||
- key: redis-config
|
|
||||||
path: redis.conf
|
|
@ -1,20 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Pod
|
|
||||||
metadata:
|
|
||||||
name: config-volume-test-pod
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: test-container
|
|
||||||
image: gcr.io/google_containers/busybox
|
|
||||||
command: [ "/bin/sh", "-c", "cat /etc/config/path/to/special-key" ]
|
|
||||||
volumeMounts:
|
|
||||||
- name: config-volume
|
|
||||||
mountPath: /etc/config
|
|
||||||
volumes:
|
|
||||||
- name: config-volume
|
|
||||||
configMap:
|
|
||||||
name: test-configmap
|
|
||||||
items:
|
|
||||||
- key: data-1
|
|
||||||
path: path/to/special-key
|
|
||||||
restartPolicy: Never
|
|
@ -1,30 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Pod
|
|
||||||
metadata:
|
|
||||||
name: kubernetes-downwardapi-volume-example
|
|
||||||
labels:
|
|
||||||
zone: us-est-coast
|
|
||||||
cluster: test-cluster1
|
|
||||||
rack: rack-22
|
|
||||||
annotations:
|
|
||||||
build: two
|
|
||||||
builder: john-doe
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: client-container
|
|
||||||
image: gcr.io/google_containers/busybox
|
|
||||||
command: ["sh", "-c", "while true; do if [[ -e /etc/labels ]]; then cat /etc/labels; fi; if [[ -e /etc/annotations ]]; then cat /etc/annotations; fi; sleep 5; done"]
|
|
||||||
volumeMounts:
|
|
||||||
- name: podinfo
|
|
||||||
mountPath: /etc
|
|
||||||
readOnly: false
|
|
||||||
volumes:
|
|
||||||
- name: podinfo
|
|
||||||
downwardAPI:
|
|
||||||
items:
|
|
||||||
- path: "labels"
|
|
||||||
fieldRef:
|
|
||||||
fieldPath: metadata.labels
|
|
||||||
- path: "annotations"
|
|
||||||
fieldRef:
|
|
||||||
fieldPath: metadata.annotations
|
|
@ -1,30 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ReplicationController
|
|
||||||
metadata:
|
|
||||||
name: backend-rc
|
|
||||||
labels:
|
|
||||||
type: backend-type
|
|
||||||
spec:
|
|
||||||
replicas: 3
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
type: backend-type
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: backend-container
|
|
||||||
image: gcr.io/google-samples/env-backend:1.1
|
|
||||||
imagePullPolicy: Always
|
|
||||||
ports:
|
|
||||||
- containerPort: 5000
|
|
||||||
protocol: TCP
|
|
||||||
env:
|
|
||||||
- name: POD_NAME
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
fieldPath: metadata.name
|
|
||||||
- name: POD_NAMESPACE
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
fieldPath: metadata.namespace
|
|
@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: backend-srv
|
|
||||||
labels:
|
|
||||||
type: backend-type
|
|
||||||
spec:
|
|
||||||
ports:
|
|
||||||
- port: 5000
|
|
||||||
protocol: TCP
|
|
||||||
selector:
|
|
||||||
type: backend-type
|
|
@ -1,32 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ReplicationController
|
|
||||||
metadata:
|
|
||||||
name: show-rc
|
|
||||||
labels:
|
|
||||||
type: show-type
|
|
||||||
spec:
|
|
||||||
replicas: 3
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
type: show-type
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: show-container
|
|
||||||
image: gcr.io/google-samples/env-show:1.1
|
|
||||||
imagePullPolicy: Always
|
|
||||||
ports:
|
|
||||||
- containerPort: 8080
|
|
||||||
protocol: TCP
|
|
||||||
env:
|
|
||||||
- name: USER_VAR
|
|
||||||
value: important information
|
|
||||||
- name: POD_NAME
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
fieldPath: metadata.name
|
|
||||||
- name: POD_NAMESPACE
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
fieldPath: metadata.namespace
|
|
@ -1,15 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: show-srv
|
|
||||||
labels:
|
|
||||||
type: show-type
|
|
||||||
spec:
|
|
||||||
type: LoadBalancer
|
|
||||||
ports:
|
|
||||||
- port: 80
|
|
||||||
protocol: TCP
|
|
||||||
targetPort: 8080
|
|
||||||
selector:
|
|
||||||
type: show-type
|
|
@ -1,14 +0,0 @@
|
|||||||
apiVersion: extensions/v1beta1
|
|
||||||
kind: HorizontalPodAutoscaler
|
|
||||||
metadata:
|
|
||||||
name: php-apache
|
|
||||||
namespace: default
|
|
||||||
spec:
|
|
||||||
scaleRef:
|
|
||||||
kind: ReplicationController
|
|
||||||
name: php-apache
|
|
||||||
subresource: scale
|
|
||||||
minReplicas: 1
|
|
||||||
maxReplicas: 10
|
|
||||||
cpuUtilization:
|
|
||||||
targetPercentage: 50
|
|
@ -1,9 +0,0 @@
|
|||||||
apiVersion: extensions/v1beta1
|
|
||||||
kind: Ingress
|
|
||||||
metadata:
|
|
||||||
name: test-ingress
|
|
||||||
spec:
|
|
||||||
backend:
|
|
||||||
serviceName: testsvc
|
|
||||||
servicePort: 80
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
|||||||
# This pod specification creates an instance of a synthetic logger. The logger
|
|
||||||
# is simply a program that writes out the hostname of the pod, a count which increments
|
|
||||||
# by one on each iteration (to help notice missing log enteries) and the date using
|
|
||||||
# a long format (RFC-3339) to nano-second precision. This program logs at a frequency
|
|
||||||
# of 0.25 lines per second. The shellscript program is given directly to bash as -c argument
|
|
||||||
# and could have been written out as:
|
|
||||||
# i="0"
|
|
||||||
# while true
|
|
||||||
# do
|
|
||||||
# echo -n "`hostname`: $i: "
|
|
||||||
# date --rfc-3339 ns
|
|
||||||
# sleep 4
|
|
||||||
# i=$[$i+1]
|
|
||||||
# done
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Pod
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
name: synth-logging-source
|
|
||||||
name: synthetic-logger-0.25lps-pod
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: synth-lgr
|
|
||||||
image: ubuntu:14.04
|
|
||||||
args:
|
|
||||||
- bash
|
|
||||||
- -c
|
|
||||||
- 'i="0"; while true; do echo -n "`hostname`: $i: "; date --rfc-3339 ns; sleep
|
|
||||||
4; i=$[$i+1]; done'
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
|||||||
# This pod specification creates an instance of a synthetic logger. The logger
|
|
||||||
# is simply a program that writes out the hostname of the pod, a count which increments
|
|
||||||
# by one on each iteration (to help notice missing log enteries) and the date using
|
|
||||||
# a long format (RFC-3339) to nano-second precision. This program logs at a frequency
|
|
||||||
# of 0.25 lines per second. The shellscript program is given directly to bash as -c argument
|
|
||||||
# and could have been written out as:
|
|
||||||
# i="0"
|
|
||||||
# while true
|
|
||||||
# do
|
|
||||||
# echo -n "`hostname`: $i: "
|
|
||||||
# date --rfc-3339 ns
|
|
||||||
# sleep 4
|
|
||||||
# i=$[$i+1]
|
|
||||||
# done
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Pod
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
name: synth-logging-source
|
|
||||||
name: synthetic-logger-10lps-pod
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: synth-lgr
|
|
||||||
image: ubuntu:14.04
|
|
||||||
args:
|
|
||||||
- bash
|
|
||||||
- -c
|
|
||||||
- 'i="0"; while true; do echo -n "`hostname`: $i: "; date --rfc-3339 ns; sleep
|
|
||||||
0.1; i=$[$i+1]; done'
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
|||||||
apiVersion: extensions/v1beta1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: nginx-deployment
|
|
||||||
spec:
|
|
||||||
replicas: 3
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: nginx
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: nginx
|
|
||||||
image: nginx:1.9.1
|
|
||||||
ports:
|
|
||||||
- containerPort: 80
|
|
@ -1,16 +0,0 @@
|
|||||||
apiVersion: extensions/v1beta1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: nginx-deployment
|
|
||||||
spec:
|
|
||||||
replicas: 3
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: nginx
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: nginx
|
|
||||||
image: nginx:1.7.9
|
|
||||||
ports:
|
|
||||||
- containerPort: 80
|
|
@ -1,13 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Pod
|
|
||||||
metadata:
|
|
||||||
name: nginx
|
|
||||||
labels:
|
|
||||||
env: test
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: nginx
|
|
||||||
image: nginx
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
nodeSelector:
|
|
||||||
disktype: ssd
|
|
@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"kind": "Namespace",
|
|
||||||
"apiVersion":"v1",
|
|
||||||
"metadata": {
|
|
||||||
"name": "myns",
|
|
||||||
"labels": {
|
|
||||||
"name": "development"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,20 +0,0 @@
|
|||||||
kind: Pod
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: mypod
|
|
||||||
labels:
|
|
||||||
name: frontendhttp
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: myfrontend
|
|
||||||
image: nginx
|
|
||||||
ports:
|
|
||||||
- containerPort: 80
|
|
||||||
name: "http-server"
|
|
||||||
volumeMounts:
|
|
||||||
- mountPath: "/usr/share/nginx/html"
|
|
||||||
name: mypd
|
|
||||||
volumes:
|
|
||||||
- name: mypd
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: myclaim-1
|
|
@ -1,19 +0,0 @@
|
|||||||
{
|
|
||||||
"kind": "Service",
|
|
||||||
"apiVersion": "v1",
|
|
||||||
"metadata": {
|
|
||||||
"name": "frontendservice"
|
|
||||||
},
|
|
||||||
"spec": {
|
|
||||||
"ports": [
|
|
||||||
{
|
|
||||||
"protocol": "TCP",
|
|
||||||
"port": 3000,
|
|
||||||
"targetPort": "http-server"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"selector": {
|
|
||||||
"name": "frontendhttp"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
12
test/fixtures/doc-yaml/user-guide/pod.yaml
vendored
12
test/fixtures/doc-yaml/user-guide/pod.yaml
vendored
@ -1,12 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Pod
|
|
||||||
metadata:
|
|
||||||
name: nginx
|
|
||||||
labels:
|
|
||||||
app: nginx
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: nginx
|
|
||||||
image: nginx
|
|
||||||
ports:
|
|
||||||
- containerPort: 80
|
|
@ -1,42 +0,0 @@
|
|||||||
apiVersion: extensions/v1beta1
|
|
||||||
kind: ReplicaSet
|
|
||||||
metadata:
|
|
||||||
name: frontend
|
|
||||||
# these labels can be applied automatically
|
|
||||||
# from the labels in the pod template if not set
|
|
||||||
# labels:
|
|
||||||
# app: guestbook
|
|
||||||
# tier: frontend
|
|
||||||
spec:
|
|
||||||
# this replicas value is default
|
|
||||||
# modify it according to your case
|
|
||||||
replicas: 3
|
|
||||||
# selector can be applied automatically
|
|
||||||
# from the labels in the pod template if not set
|
|
||||||
# selector:
|
|
||||||
# matchLabels:
|
|
||||||
# app: guestbook
|
|
||||||
# tier: frontend
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: guestbook
|
|
||||||
tier: frontend
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: php-redis
|
|
||||||
image: gcr.io/google_samples/gb-frontend:v3
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 100Mi
|
|
||||||
env:
|
|
||||||
- name: GET_HOSTS_FROM
|
|
||||||
value: dns
|
|
||||||
# If your cluster config does not include a dns service, then to
|
|
||||||
# instead access environment variables to find service host
|
|
||||||
# info, comment out the 'value: dns' line above, and uncomment the
|
|
||||||
# line below.
|
|
||||||
# value: env
|
|
||||||
ports:
|
|
||||||
- containerPort: 80
|
|
@ -1,12 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Pod
|
|
||||||
metadata:
|
|
||||||
name: nginx
|
|
||||||
labels:
|
|
||||||
app: nginx
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: nginx
|
|
||||||
image: nginx
|
|
||||||
ports:
|
|
||||||
- containerPort: 80
|
|
@ -1,10 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Pod
|
|
||||||
metadata:
|
|
||||||
name: nginx
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: nginx
|
|
||||||
image: nginx
|
|
||||||
ports:
|
|
||||||
- containerPort: 80
|
|
@ -1,14 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Pod
|
|
||||||
metadata:
|
|
||||||
name: redis
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: redis
|
|
||||||
image: redis
|
|
||||||
volumeMounts:
|
|
||||||
- name: redis-persistent-storage
|
|
||||||
mountPath: /data/redis
|
|
||||||
volumes:
|
|
||||||
- name: redis-persistent-storage
|
|
||||||
emptyDir: {}
|
|
@ -1,20 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Pod
|
|
||||||
metadata:
|
|
||||||
name: pod-with-healthcheck
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: nginx
|
|
||||||
image: nginx
|
|
||||||
# defines the health checking
|
|
||||||
livenessProbe:
|
|
||||||
# an http probe
|
|
||||||
httpGet:
|
|
||||||
path: /_status/healthz
|
|
||||||
port: 80
|
|
||||||
# length of time to wait for a pod to initialize
|
|
||||||
# after pod startup, before applying health checking
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
timeoutSeconds: 1
|
|
||||||
ports:
|
|
||||||
- containerPort: 80
|
|
@ -1,24 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: ReplicationController
|
|
||||||
metadata:
|
|
||||||
name: nginx-controller
|
|
||||||
spec:
|
|
||||||
replicas: 2
|
|
||||||
# selector identifies the set of Pods that this
|
|
||||||
# replication controller is responsible for managing
|
|
||||||
selector:
|
|
||||||
app: nginx
|
|
||||||
# podTemplate defines the 'cookie cutter' used for creating
|
|
||||||
# new pods when necessary
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
# Important: these labels need to match the selector above
|
|
||||||
# The api server enforces this constraint.
|
|
||||||
app: nginx
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: nginx
|
|
||||||
image: nginx
|
|
||||||
ports:
|
|
||||||
- containerPort: 80
|
|
@ -1,16 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: nginx-service
|
|
||||||
spec:
|
|
||||||
ports:
|
|
||||||
- port: 8000 # the port that this service should serve on
|
|
||||||
# the container on each pod to connect to, can be a name
|
|
||||||
# (e.g. 'www') or a number (e.g. 80)
|
|
||||||
targetPort: 80
|
|
||||||
protocol: TCP
|
|
||||||
# just like the selector in the replication controller,
|
|
||||||
# but this time it identifies the set of pods to load balance
|
|
||||||
# traffic to.
|
|
||||||
selector:
|
|
||||||
app: nginx
|
|
Loading…
Reference in New Issue
Block a user