-
-
Save rupinus85/1eae365893df5ea1d7e3a27ff6e65033 to your computer and use it in GitHub Desktop.
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
#Deployment 생성 파일에 아래 nodeSelector 필드를 추가 | |
#nodeSelector를 통해 Pod가 특정 노드에서만 실행하도록 제한. | |
#'hostname=10.178.158.181' 라는 label을 가진 노드를 지정하여 pod를 배포 | |
apiVersion: apps/v1beta2 # for versions before 1.8.0 use apps/v1beta1 | |
kind: Deployment | |
metadata: | |
name: gs-spring-boot-docker-deployment | |
labels: | |
app: gs-spring-boot-docker | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: gs-spring-boot-docker | |
template: | |
metadata: | |
labels: | |
app: gs-spring-boot-docker | |
spec: | |
containers: | |
- name: gs-spring-boot-docker | |
image: dtlabs/gs-spring-boot-docker:1.0 | |
ports: | |
- containerPort: 8080 | |
imagePullPolicy: Always | |
nodeSelector: | |
hostname: 10.178.158.181 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment