-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from gadkins/main
Remove kustomization; update readme
- Loading branch information
Showing
7 changed files
with
75 additions
and
76 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,41 @@ | ||
### Hello World K8s | ||
# Hello World for Uffizzi Virtual Clusters (~2 min) | ||
|
||
## ~ 2 minutes | ||
This repo demonstrates how you can create Kubernetes virtual cluster on Uffizzi Cloud, the apply manifests for an example application. | ||
|
||
This example demonstrates how you can deploy a simple k8s application on a Uffizzi Cluster. | ||
|
||
|
||
1. Login to your Uffizzi account | ||
1. Clone this repository | ||
``` | ||
uffizzi login | ||
git clone https://github.com/UffizziCloud/hello-world.git && \ | ||
cd hello-world | ||
``` | ||
|
||
2. Create a Uffizzi cluster | ||
2. Authenticate with Uffizzi. This command will open a browser window for you to login or create an account. | ||
``` | ||
uffizzi cluster create | ||
uffizzi login | ||
``` | ||
|
||
3. Update local kubeconfig with the Uffizzi cluster's kubeconfig | ||
3. Create a Uffizzi cluster | ||
``` | ||
uffizzi cluster update-kubeconfig coolbean-cole | ||
uffizzi cluster create hello | ||
# [⠦] Creating cluster hello... | ||
``` | ||
|
||
4. Apply Kubernetes Manifests | ||
``` | ||
kubectl apply -f ./k8s | ||
kubectl apply -f ./manifests | ||
``` | ||
Wait for the deployment to come up | ||
Wait for the deployment to come up | ||
|
||
5. Get the Ingress to the deployed application | ||
5. Get the Ingress to the deployed application | ||
``` | ||
kubectl get ingress web --kubeconfig kubeconfig -o json | jq '.spec.rules[0].host' | tr -d '"' | ||
kubectl get ingress web --kubeconfig ~/.kube/config -o json | jq '.spec.rules[0].host' | tr -d '"' | ||
``` | ||
|
||
The host address should look something like this: | ||
> `web-default-hello-c850.uclusters.app.uffizzi.com` | ||
Copy and past this address into your browser to see the application running. | ||
|
||
7. Cleanup | ||
``` | ||
uffizzi cluster delete hello | ||
``` |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: web | ||
spec: | ||
ports: | ||
- port: 3000 | ||
name: http | ||
type: ClusterIP | ||
selector: | ||
app: web | ||
--- | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: web | ||
spec: | ||
ingressClassName: uffizzi | ||
rules: | ||
- host: web.example.com | ||
http: | ||
paths: | ||
- backend: | ||
service: | ||
name: web | ||
port: | ||
number: 3000 | ||
path: / | ||
pathType: Prefix | ||
tls: | ||
- hosts: | ||
- web.example.com | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: web | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: web | ||
template: | ||
metadata: | ||
labels: | ||
app: web | ||
spec: | ||
containers: | ||
- name: web | ||
image: uffizzi/hello-world-k8s | ||
ports: | ||
- containerPort: 3000 |
This file was deleted.
Oops, something went wrong.