This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import json | |
from kubernetes import client, config, watch | |
# 이 스케줄러가 담당할 스케줄러 이름을 지정합니다. | |
scheduler_name = "my-custom-scheduler" | |
# 이 스케줄러가 스케줄링할 포드의 네임스페이스를 지정합니다. 필요에 따라 전역적으로 사용할 수도 있습니다. | |
namespace_name = "default" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"sort" | |
) | |
type person struct { | |
age int | |
number int |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:16.04 | |
RUN apt update && apt install wget git build-essential vim -y | |
RUN wget https://dl.google.com/go/go1.12.linux-amd64.tar.gz && \ | |
tar -xvf go1.12.linux-amd64.tar.gz && \ | |
mv go /usr/local | |
ENV GOROOT=/usr/local/go | |
ENV GOPATH=/root/go | |
ENV PATH="$GOPATH/bin:$GOROOT/bin:${PATH}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Original link : https://github.com/roshanp30/Kubernetes-Api-using-python/blob/master/podcrud.py | |
import yaml | |
from os import path | |
from kubernetes import client, config, utils | |
from pprint import pprint | |
DEPLOYMENT_NAME = "alicek106" | |
IMAGE_NAME = "nginx" | |
PORT_NO = 80 | |
APP_NAME = "alicek106" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Original link : https://github.com/roshanp30/Kubernetes-Api-using-python/blob/master/podcrud.py | |
import yaml | |
from os import path | |
from kubernetes import client, config, utils | |
from pprint import pprint | |
DEPLOYMENT_NAME = "alicek106" | |
IMAGE_NAME = "nginx" | |
PORT_NO = 80 | |
APP_NAME = "alicek106" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# build stage | |
FROM golang:1.12.7-alpine | |
RUN apk add build-base git | |
RUN go get github.com/dexidp/dex; exit 0 | |
WORKDIR src/github.com/dexidp/dex | |
RUN make | |
# final stage | |
FROM alpine | |
COPY --from=0 /go/src/github.com/dexidp/dex/bin/example-app / |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: ClusterConfiguration | |
apiVersion: kubeadm.k8s.io/v1beta1 | |
apiServer: | |
extraArgs: | |
authorization-mode: Node,RBAC | |
cloud-provider: aws | |
oidc-issuer-url: https://dex.alicek106.com | |
oidc-client-id: example-app | |
oidc-ca-file: /etc/ssl/oidc-certs/ca.pem | |
oidc-username-claim: email |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data: | |
log4j2.properties: |- | |
status = error | |
appender.console.type = Console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
args: | |
- "-c" | |
- | | |
echo ['date'] ping | |
sleep 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: Ingress | |
metadata: | |
annotations: | |
nginx.ingress.kubernetes.io/server-snippet: | | |
set $flag 0; | |
if ($http_user_agent ~* "(Mobile)" ){ | |
set $flag = 1; | |
} | |
if ( $flag = 1 ){ | |
return 301 http://google.com; |