https://github.com/apitreecz/k8s-demo
https://github.com/apitreecz/k8s-demo
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/apitreecz/k8s-demo
- Owner: ApiTreeCZ
- License: gpl-3.0
- Created: 2022-02-01T21:31:54.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-10-25T10:43:38.000Z (over 3 years ago)
- Last Synced: 2025-02-13T00:51:06.859Z (over 1 year ago)
- Size: 15.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# k8s-demo
Login:
```shell
gcloud auth login
```
Setup cluster
```shell
gcloud container clusters get-credentials CLUSTER_NAME
```
Deploy (deployment):
```shell
kubectl apply -f src/deployment.yaml
```
Deploy (service)
```shell
kubectl apply -f src/service.yaml
```
List of contexts
````shell
kubectl config get-contexts
````
Remove context from config (not from server)
```shell
kubectl config delete-context CONTEXT_NAME
```
Links:
* [gcloud install](https://cloud.google.com/sdk/docs/install)
* [gcloud auth](https://cloud.google.com/sdk/gcloud/reference/auth)
* [configure cluster](https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl)
* [expose services](https://cloud.google.com/kubernetes-engine/docs/how-to/exposing-apps)
* [kubectx](https://github.com/ahmetb/kubectx)
* [helm](https://helm.sh/)