View statefulset-architecture.sh
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
┏━━━━━━━━━━━━┓ ┏━━━━━━━━━━━━━━━━━━━━━━┓ | |
| my-pod-1 |--->| mysql (r/w replica) | | |
┗━━━━━━━━━━━━┛ ┗━━━━━━━━━━━━━━━━━━━━━━┛ | |
┏━━━━━━━━━━━━┓ ┏━━━━━━━━━━━━━━━━━━━━━━┓ | |
| my-pod-2 |--->| mysql (read replica) | | |
┗━━━━━━━━━━━━┛ ┗━━━━━━━━━━━━━━━━━━━━━━┛ | |
View service.yml
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: v1 | |
kind: Service | |
metadata: | |
name: basic-spring-service | |
spec: | |
type: NodePort | |
ports: | |
- port: 8080 | |
nodePort: 30056 | |
targetPort: 8080 |
View deployment-v2.yml
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: basic-spring-app-deployment | |
spec: | |
strategy: | |
type: RollingUpdate | |
rollingUpdate: | |
maxUnavailable: 1 | |
maxSurge: 1 |
View deployment.yml
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: basic-spring-app-deployment | |
spec: | |
replicas: 5 | |
selector: | |
matchLabels: | |
env: development | |
minReadySeconds: 15 |
View pod.yml
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: v1 | |
kind: Pod | |
metadata: | |
name: basic-spring-app | |
labels: | |
env: development | |
spec: | |
containers: | |
- name: basic-spring-app | |
image: hakaneroztekin/basic-spring-app |
View kube-architecture.sh
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
control plane | |
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ | |
|┏━━━━━━━━━━┓ ┏━━━━━━━━━━━━━┓| | |
|| |<-->|cluster store|| | |
|| | ┗━━━━━━━━━━━━━┛| | |
|| | ┏━━━━━━━━━━━━━┓| | |
kubectl<-->||api server|<-->| controller || | |
|| | ┗━━━━━━━━━━━━━┛| | |
┏-->|| | ┏━━━━━━━━━━━━━┓| | |
| || |<-->| scheduler || |
View docker-compose-with-volume.yml
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
version: "3.7" | |
services: | |
spring-app: | |
build: . | |
image: spring-app | |
ports: | |
- "4000:8080" | |
networks: | |
- shared-network | |
depends_on: |
View docker-spring-controller.java
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
@RestController | |
@RequestMapping("/") | |
@RequiredArgsConstructor | |
public class GreetingsController { | |
private static final String DOCUMENT_KEY = "clickCount"; | |
private final ClickCountRepository clickCountRepository; | |
@GetMapping |
View docker-spring-redis-update-host.properties
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
spring.redis.host=redis-service |
View docker-click-count-repository.java
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
@Repository | |
public interface ClickCountRepository extends CrudRepository<ClickCount, String> { | |
} |
NewerOlder