Skip to content

Instantly share code, notes, and snippets.

View nak3's full-sized avatar

Kenjiro Nakayama nak3

View GitHub Profile
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- name: nginx
image: nginx
resources:
limits:
{
"apiVersion": "v1",
"items": [
{
"apiVersion": "v1",
"kind": "ImageStream",
"metadata": {
"creationTimestamp": null,
"labels": {
"app": "hello-c"
@nak3
nak3 / killer.yaml
Last active September 1, 2015 09:46
apiVersion: v1
items:
- apiVersion: v1
kind: BuildConfig
metadata:
creationTimestamp: null
labels:
app: hello-c
name: hello-c
spec:
@nak3
nak3 / test-rolling.json
Last active September 2, 2015 10:15
test-complete + rolling strategy example
{
"kind": "List",
"apiVersion": "v1",
"metadata": {
"name": "hello-service-complete-example"
},
"items": [
{
"kind": "Service",
"apiVersion": "v1",
@nak3
nak3 / divide.sh
Last active September 5, 2015 15:55
num=0; for i in is bc dc svc ; do cat hello.json | /usr/local/bin/jq .items[$num] > $i.json; num=$(( num + 1 )); done
{
"kind": "List",
"apiVersion": "v1",
"metadata": {},
"items": [
{
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "helloworld-v3",
@nak3
nak3 / bc.json
Created September 7, 2015 17:12
{
"status": {
"lastVersion": 0
},
"spec": {
"resources": {},
"output": {
"to": {
"name": "helloworld-v3:latest",
"kind": "ImageStreamTag"
@nak3
nak3 / is.json
Created September 7, 2015 17:12
{
"status": {
"dockerImageRepository": ""
},
"spec": {},
"metadata": {
"labels": {
"app": "helloworld-v3"
},
"creationTimestamp": null,
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#!/bin/bash
# Prerequires
yum -y install docker
sed -i -e "s/OPTIONS='--selinux-enabled'/OPTIONS='--insecure-registry=172.30.0.0\/16 --selinux-enabled'/" /etc/sysconfig/docker
systemctl restart docker
# Master setup
yum -y install openshift-master