Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Working with Kubernetes, Docker and Google Cloud
- ### Requirements
- - `docker` and `kubectl` set up
- - a working `Dockerfile` within a project
- - a Google Cloud Container registry
- 1. Build a docker image locally
- `docker build -t cryptokitties-api-abhi .`
- 2. Configure your docker to work with Google Cloud
- `gcloud auth configure-docker`
- 2. Add a docker tag to the remote registry
- `docker tag cryptokitties-api-abhi gcr.io/az-cryptokitties/cryptokitties-api/`
- 3. Push the tag to the Container Registry
- `docker push gcr.io/az-cryptokitties/cryptokitties-api-abhi`
- 4. Use the image in your `k8` YAML file. Once you have update the file
- `kubectl apply -f kitty-birth-worker-deployment-staging.yml`
- 5. Use the `-n` flag to get the running pods for your container by running
- `kubectl get pods -n staging`
- 6. Use the `logs` command to see the output of the container. The `-f` flag allows you to follow the tail of this log.
- `kubectl logs cryptokitties-api-kitty-autobirth-worker-fb5ffdf8d-8vnjb -n staging -f`
Add Comment
Please, Sign In to add comment