-
-
Save luversof/e52fc1133a22d5361a14a74d2eb40c29 to your computer and use it in GitHub Desktop.
kubernetes 설정 파일
This file contains 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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: elasticsearch-deployment | |
labels: | |
app: elasticsearch | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: elasticsearch | |
template: | |
metadata: | |
labels: | |
app: elasticsearch | |
spec: | |
containers: | |
- name: elasticsearch | |
image: elasticsearch:8.4.3 | |
env: | |
- name: discovery.type | |
value: "single-node" | |
ports: | |
- containerPort: 9200 | |
- containerPort: 9300 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: elasticsearch-service | |
spec: | |
selector: | |
app: elasticsearch | |
ports: | |
- protocol: TCP | |
name: kibana-port | |
port: 9200 | |
targetPort: 9200 | |
- protocol: TCP | |
name: kibana-port2 | |
port: 9300 | |
targetPort: 9300 | |
type: LoadBalancer |
This file contains 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 jenkins/jenkins:jdk11 | |
MAINTAINER bluesky <luversof@hanmail.net> | |
USER root | |
RUN curl -fsSL https://get.docker.com -o get-docker.sh \ | |
&& sh get-docker.sh | |
RUN usermod -aG docker jenkins | |
USER jenkins |
This file contains 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
docker pull jenkins/jenkins:jdk11 | |
docker build -f jenkins-Dockerfile --tag luversof/jenkins . | |
kubectl delete pods -l app=jenkins |
This file contains 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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: jenkins-deployment | |
labels: | |
app: jenkins | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: jenkins | |
template: | |
metadata: | |
labels: | |
app: jenkins | |
spec: | |
containers: | |
- name: jenkins | |
image: luversof/jenkins:latest | |
imagePullPolicy: Never | |
ports: | |
- containerPort: 8080 | |
- containerPort: 50000 | |
env: | |
- name: JAVA_OPTS | |
value: "-Duser.timezone=Asia/Seoul" | |
volumeMounts: | |
- name: jenkins-docker-sock | |
mountPath: /var/run/docker.sock | |
# - name: jenkins-docker | |
# mountPath: /root/.docker | |
- name: jenkins-home | |
mountPath: /var/jenkins_home | |
- name: jenkins-m2 | |
mountPath: /root/.m2 | |
# 절대 권장하지 않는 방식임 | |
securityContext: | |
privileged: true | |
# allowPrivilegeEscalation: false | |
runAsUser: 0 | |
volumes: | |
- name: jenkins-docker-sock | |
hostPath: | |
path: /var/run/docker.sock | |
# - name: jenkins-docker | |
# hostPath: | |
# path: /mnt/c/data/jenkins-docker | |
- name: jenkins-home | |
hostPath: | |
# path: /mnt/c/data/jenkins-home | |
path: /mnt/f/dev/data/jenkins-home | |
- name: jenkins-m2 | |
hostPath: | |
# path: /mnt/c/data/jenkins-m2 | |
path: /mnt/f/dev/data/jenkins-m2 | |
# imagePullSecrets: | |
# - name: bluesky-secret | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: jenkins-service | |
spec: | |
selector: | |
app: jenkins | |
ports: | |
- protocol: TCP | |
name: jenkins-port | |
port: 8080 | |
targetPort: 8080 | |
- protocol: TCP | |
name: jenkins-slave-agent-port | |
port: 50000 | |
targetPort: 50000 | |
type: LoadBalancer |
This file contains 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
# https://www.magalix.com/blog/kafka-on-kubernetes-and-deploying-best-practice | |
kind: Deployment | |
apiVersion: apps/v1 | |
metadata: | |
name: zookeeper-deploy | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: zookeeper-1 | |
template: | |
metadata: | |
labels: | |
app: zookeeper-1 | |
spec: | |
containers: | |
- name: zoo1 | |
image: digitalwonderland/zookeeper | |
ports: | |
- containerPort: 2181 | |
env: | |
- name: ZOOKEEPER_ID | |
value: "1" | |
- name: ZOOKEEPER_SERVER_1 | |
value: zoo1 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: zoo1 | |
labels: | |
app: zookeeper-1 | |
spec: | |
ports: | |
- name: client | |
port: 2181 | |
protocol: TCP | |
- name: follower | |
port: 2888 | |
protocol: TCP | |
- name: leader | |
port: 3888 | |
protocol: TCP | |
selector: | |
app: zookeeper-1 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: kafka-service | |
labels: | |
name: kafka | |
spec: | |
ports: | |
- port: 9092 | |
name: kafka-port | |
protocol: TCP | |
selector: | |
app: kafka | |
id: "0" | |
type: LoadBalancer | |
--- | |
kind: Deployment | |
apiVersion: apps/v1 | |
metadata: | |
name: kafka-broker0 | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: kafka | |
id: "0" | |
template: | |
metadata: | |
labels: | |
app: kafka | |
id: "0" | |
spec: | |
containers: | |
- name: kafka | |
image: wurstmeister/kafka | |
ports: | |
- containerPort: 9092 | |
env: | |
- name: KAFKA_ADVERTISED_PORT | |
value: "9092" | |
- name: KAFKA_ADVERTISED_HOST_NAME | |
value: 127.0.0.1 | |
- name: KAFKA_ZOOKEEPER_CONNECT | |
value: zoo1:2181 | |
- name: KAFKA_BROKER_ID | |
value: "0" | |
- name: KAFKA_CREATE_TOPICS | |
value: admintome-test:1:1 |
This file contains 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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: kibana-deployment | |
labels: | |
app: kibana | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: kibana | |
template: | |
metadata: | |
labels: | |
app: kibana | |
spec: | |
containers: | |
- name: kibana | |
image: kibana:8.4.3 | |
ports: | |
- containerPort: 5601 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: kibana-service | |
spec: | |
selector: | |
app: kibana | |
ports: | |
- protocol: TCP | |
name: kibana-port | |
port: 5601 | |
targetPort: 5601 | |
type: LoadBalancer |
This file contains 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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: sonarqube-deployment | |
labels: | |
app: sonarqube | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: sonarqube | |
template: | |
metadata: | |
labels: | |
app: sonarqube | |
spec: | |
containers: | |
- name: sonarqube | |
image: sonarqube | |
ports: | |
- containerPort: 9000 | |
env: | |
- name: SONAR_JDBC_URL | |
value: "jdbc:sqlserver://mssql-service;databaseName=sonarqube;encrypt=false" | |
- name: SONAR_JDBC_USERNAME | |
value: "sa" | |
- name: SONAR_JDBC_PASSWORD | |
value: "testPassword!" | |
volumeMounts: | |
- name: sonarqube-data | |
mountPath: /opt/sonarqube/data | |
- name: sonarqube-extensions | |
mountPath: /opt/sonarqube/extensions | |
- name: sonarqube-logs | |
mountPath: /opt/sonarqube/logs | |
volumes: | |
- name: sonarqube-data | |
hostPath: | |
path: /mnt/f/dev/data/sonarqube-data | |
- name: sonarqube-extensions | |
hostPath: | |
path: /mnt/f/dev/data/sonarqube-extensions | |
- name: sonarqube-logs | |
hostPath: | |
path: /mnt/f/dev/data/sonarqube-logs | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: sonarqube-service | |
spec: | |
selector: | |
app: sonarqube | |
ports: | |
- protocol: TCP | |
name: sonarqube-port | |
port: 9000 | |
targetPort: 9000 | |
type: LoadBalancer |
This file contains 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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: zeppelin-deployment | |
labels: | |
app: zeppelin | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: zeppelin | |
template: | |
metadata: | |
labels: | |
app: zeppelin | |
spec: | |
containers: | |
- name: zeppelin | |
image: apache/zeppelin:0.9.0 | |
ports: | |
- containerPort: 8080 | |
volumeMounts: | |
- name: zeppelin-notebook | |
mountPath: /opt/zeppelin/notebook | |
volumes: | |
- name: zeppelin-notebook | |
hostPath: | |
path: /mnt/f/dev/data/zeppelin-notebook | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: zeppelin-service | |
spec: | |
selector: | |
app: zeppelin | |
ports: | |
- protocol: TCP | |
port: 8085 | |
targetPort: 8080 | |
type: LoadBalancer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment