This guide will help you get some CLIs set up that will help you view deployments, pods, logs, etc in our cluster.
You'll first want to use brew to install all the tools and dependencies:
brew install kubernetes-cli argocd tunnelblick saml2aws aws-iam-authenticator
Next, copy this into your .zshrc/.bashrc/.bash_profile:
function k8s-context () {kubectl config use-context ${1}}function k8s-login {saml2aws login -a kuali-build --session-duration=28800export AWS_PROFILE=kuali-buildexport KUBECONFIG=~/.kube/config}
Now go into 1password and look for a secret note entitled "Kubernetes Local Files". Download the 3 files in that note.
config to ~/.kube/config.setup-saml-to-aws.sh and input your one login username and password. Execute the file. Now you can delete it.kuali.opvn as a configuration in tunnelblickStart tunnelblick and connect to the VPN. You'll need to use your OneLogin username/password/OTP to login. Then run the following commands:
# You'll have to do this once every morningk8s-login# Now run this to see all the available contextskubectl config get-contexts# Pick one of those and use this command to switch to itk8s-context <context-name-here># now log in to argoargocd login --core
You're in! Here are some example commands you could run and what they do:
# grab all the namespaces in your contextkubectl get ns# view all the deployments in the prod namespacekubectl -n prod get deployments# view all the pods in the prod namespacekubectl -n prod get pods# view all the pods in the prod namespace for a specific deploymentkubectl -n prod get pods -l app=<deployment-name># view the deployment manifest for a specific deployment in the prod namespacekubectl -n prod get deployment <deployment-name> -o yaml# view the logs of a specific pod in the verify namespacekubectl -n verify logs <pod-name># same as above but view the previously running, now dead podkubectl -n verify logs -p <pod-name># See health events (events are only stored for an hour)kubectl -n verify get events# see all the argo appsargocd app list# view details for a specific argo appargocd app get <app-name># force the argo app to syncronize (this happens automatically every 30 seconds)argocd app sync <app-name>