Skip to content
Snippets Groups Projects
Matthew Odle's avatar
Matthew Odle authored
baa12de7
History

Deployment

# set your namespace
kubectl config set-context --current --namespace=$TARGET_NAMESPACE

# create the deployment
kubectl create -f deployment/deployment.yml

# create the service
kubectl create -f deployment/service.yml

Verification

# describe your service
kubectl describe service -n $TARGET_NAMESPACE $NAME

# describe your deployment
kubectl describe deployment -n $TARGET_NAMESPACE $NAME

# describe your pods
kubectl describe pods -n $TARGET_NAMESPACE $NAME

Test connectivity

Test pod connectivity

# forward a port for local testing
# get the pod name from  `kubectl describe pods -n $TARGET_NAMESPACE $NAME`
kubectl describe pods -n $TARGET_NAMESPACE $NAME | grep ^Name\:
kubectl port-forward pod/$POD_NAME 8080

# test the locally forwarded port
curl -sSf localhost:8080

Test LoadBalancer connectivity

kubectl describe service -n $TARGET_NAMESPACE $NAME | grep ^LoadBalancer
curl 10.1.X.X