{"id":2126,"date":"2022-02-15T13:56:42","date_gmt":"2022-02-15T13:56:42","guid":{"rendered":"https:\/\/blog.samarthya.me\/wps\/?p=2126"},"modified":"2022-02-25T06:33:12","modified_gmt":"2022-02-25T06:33:12","slug":"devspace-managing-apps-in-kubernetes","status":"publish","type":"post","link":"https:\/\/blog.samarthya.me\/wps\/2022\/02\/15\/devspace-managing-apps-in-kubernetes\/","title":{"rendered":"`Devspace`: Managing Apps in Kubernetes"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"what-is-devspace\">What is <code>devspace<\/code>?<\/h2>\n\n\n\n<p><code>devspace<\/code> is a CLI tool for kubernetes, which can help you configure, deploy, debug. and test your application inside Kubernetes.<\/p>\n\n\n\n<p>DevSpace allows you to <\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Store all your workflows in one declarative config file: <code>devspace.yaml<\/code><\/li><li>Standardize deployment and development workflows without requiring everyone on the team to become a Kubernetes expert.<\/li><li>DevSpace allows you to hot reload running containers while coding<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-pullquote has-white-color has-black-background-color has-text-color has-background\"><blockquote><p>Read more about devspace <a href=\"https:\/\/devspace.sh\/cli\/docs\/introduction\">here<\/a><\/p><\/blockquote><\/figure>\n\n\n\n<p>Looking the official diagram from <code>devspace<\/code> which shows the benefits in detail<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><img decoding=\"async\" src=\"https:\/\/devspace.sh\/cli\/img\/workflow-devspace.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>In this blog I will use <code>devspace<\/code>, <code>rancher-desktop<\/code> and k3d for quickly deploying a local application developed in previous blogs (<a href=\"https:\/\/github.com\/samarthya\/spinnaker-hello\" target=\"_blank\" rel=\"noreferrer noopener\">Spinnaker-Hellow<\/a>).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-1-create-a-local-cluster\">Step 1: Create a local cluster<\/h2>\n\n\n\n<p>We will be using <code>k3d<\/code> to create cluster<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"options\">Options<\/h3>\n\n\n\n<p><code>k3d cluster create -h<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Create a new k3s cluster with containerized nodes (k3s in docker).\nEvery cluster will consist of one or more containers:\n\t- 1 (or more) server node container (k3s)\n\t- (optionally) 1 loadbalancer container as the entrypoint to the cluster (nginx)\n\t- (optionally) 1 (or more) agent node containers (k3s)\n\nUsage:\n  k3d cluster create NAME &#91;flags]\n\nFlags:\n  -a, --agents int                                                     Specify how many agents you want to create\n      --agents-memory string                                           Memory limit imposed on the agents nodes &#91;From docker]\n      --api-port &#91;HOST:]HOSTPORT                                       Specify the Kubernetes API server port exposed on the LoadBalancer (Format: &#91;HOST:]HOSTPORT)\n                                                                        - Example: `k3d cluster create --servers 3 --api-port 0.0.0.0:6550`\n  -c, --config string                                                  Path of a config file to use\n  -e, --env KEY&#91;=VALUE]&#91;@NODEFILTER&#91;;NODEFILTER...]]                   Add environment variables to nodes (Format: KEY&#91;=VALUE]&#91;@NODEFILTER&#91;;NODEFILTER...]]\n                                                                        - Example: `k3d cluster create --agents 2 -e \"HTTP_PROXY=my.proxy.com@server:0\" -e \"SOME_KEY=SOME_VAL@server:0\"`\n      --gpus string                                                    GPU devices to add to the cluster node containers ('all' to pass all GPUs) &#91;From docker]\n  -h, --help                                                           help for create\n      --host-alias ip:host&#91;,host,...]                                  Add ip:host&#91;,host,...] mappings\n      --host-pid-mode                                                  Enable host pid mode of server(s) and agent(s)\n  -i, --image string                                                   Specify k3s image that you want to use for the nodes\n      --k3s-arg ARG@NODEFILTER&#91;;@NODEFILTER]                           Additional args passed to k3s command (Format: ARG@NODEFILTER&#91;;@NODEFILTER])\n                                                                        - Example: `k3d cluster create --k3s-arg \"--disable=traefik@server:0\"\n      --k3s-node-label KEY&#91;=VALUE]&#91;@NODEFILTER&#91;;NODEFILTER...]]        Add label to k3s node (Format: KEY&#91;=VALUE]&#91;@NODEFILTER&#91;;NODEFILTER...]]\n                                                                        - Example: `k3d cluster create --agents 2 --k3s-node-label \"my.label@agent:0,1\" --k3s-node-label \"other.label=somevalue@server:0\"`\n      --kubeconfig-switch-context                                      Directly switch the default kubeconfig's current-context to the new cluster's context (requires --kubeconfig-update-default) (default true)\n      --kubeconfig-update-default                                      Directly update the default kubeconfig with the new cluster's context (default true)\n      --lb-config-override strings                                     Use dotted YAML path syntax to override nginx loadbalancer settings\n      --network string                                                 Join an existing network\n      --no-image-volume                                                Disable the creation of a volume for importing images\n      --no-lb                                                          Disable the creation of a LoadBalancer in front of the server nodes\n      --no-rollback                                                    Disable the automatic rollback actions, if anything goes wrong\n  -p, --port &#91;HOST:]&#91;HOSTPORT:]CONTAINERPORT&#91;\/PROTOCOL]&#91;@NODEFILTER]   Map ports from the node containers (via the serverlb) to the host (Format: &#91;HOST:]&#91;HOSTPORT:]CONTAINERPORT&#91;\/PROTOCOL]&#91;@NODEFILTER])\n                                                                        - Example: `k3d cluster create --agents 2 -p 8080:80@agent:0 -p 8081@agent:1`\n      --registry-config string                                         Specify path to an extra registries.yaml file\n      --registry-create NAME&#91;:HOST]&#91;:HOSTPORT]                         Create a k3d-managed registry and connect it to the cluster (Format: NAME&#91;:HOST]&#91;:HOSTPORT]\n                                                                        - Example: `k3d cluster create --registry-create mycluster-registry:0.0.0.0:5432`\n      --registry-use stringArray                                       Connect to one or more k3d-managed registries running locally\n      --runtime-label KEY&#91;=VALUE]&#91;@NODEFILTER&#91;;NODEFILTER...]]         Add label to container runtime (Format: KEY&#91;=VALUE]&#91;@NODEFILTER&#91;;NODEFILTER...]]\n                                                                        - Example: `k3d cluster create --agents 2 --runtime-label \"my.label@agent:0,1\" --runtime-label \"other.label=somevalue@server:0\"`\n  -s, --servers int                                                    Specify how many servers you want to create\n      --servers-memory string                                          Memory limit imposed on the server nodes &#91;From docker]\n      --subnet 172.28.0.0\/16                                           &#91;Experimental: IPAM] Define a subnet for the newly created container network (Example: 172.28.0.0\/16)\n      --timeout duration                                               Rollback changes if cluster couldn't be created in specified duration.\n      --token string                                                   Specify a cluster token. By default, we generate one.\n  -v, --volume &#91;SOURCE:]DEST&#91;@NODEFILTER&#91;;NODEFILTER...]]              Mount volumes into the nodes (Format: &#91;SOURCE:]DEST&#91;@NODEFILTER&#91;;NODEFILTER...]]\n                                                                        - Example: `k3d cluster create --agents 2 -v \/my\/path@agent:0,1 -v \/tmp\/test:\/tmp\/other@server:0`\n      --wait                                                           Wait for the server(s) to be ready before returning. Use '--timeout DURATION' to not wait forever. (default true)\n\nGlobal Flags:\n      --timestamps   Enable Log timestamps\n      --trace        Enable super verbose output (trace logging)\n      --verbose      Enable verbose output (debug logging)<\/code><\/pre>\n\n\n\n<p>In our case we can simply say<\/p>\n\n\n\n<pre id=\"block-aff07d88-c8f1-47c3-96ba-cc4fcd4dc020\" class=\"wp-block-code\"><code>k3d cluster create spinnaker<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>INFO&#91;0000] Prep: Network                                \nINFO&#91;0000] Created network 'k3d-spinnaker'            \nINFO&#91;0000] Created image volume k3d-spinnaker-images  \nINFO&#91;0000] Starting new tools node...                   \nINFO&#91;0000] Starting Node 'k3d-spinnaker-tools'        \nINFO&#91;0001] Creating node 'k3d-spinnaker-server-0'     \nINFO&#91;0001] Creating LoadBalancer 'k3d-spinnaker-serverlb' \nINFO&#91;0001] Using the k3d-tools node to gather environment information \nINFO&#91;0001] HostIP: using network gateway 172.20.0.1 address \nINFO&#91;0001] Starting cluster 'spinnaker-1'               \nINFO&#91;0001] Starting servers...                          \nINFO&#91;0001] Starting Node 'k3d-spinnaker-server-0'     \nINFO&#91;0008] All agents already running.                  \nINFO&#91;0008] Starting helpers...                          \nINFO&#91;0008] Starting Node 'k3d-spinnaker-serverlb'     \nINFO&#91;0015] Injecting records for hostAliases (incl. host.k3d.internal) and for 2 network members into CoreDNS configmap... \nINFO&#91;0017] Cluster 'spinnaker' created successfully!  \nINFO&#91;0017] You can now use it like this:                \nkubectl cluster-info<\/code><\/pre>\n\n\n\n<p>Eventually you will be able to list the cluster creation like below<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&gt; k3d cluster list     \nNAME        SERVERS   AGENTS   LOADBALANCER\nspinnaker   1\/1       0\/0      true<\/code><\/pre>\n\n\n\n<p>Use the newly created cluster<\/p>\n\n\n\n<pre id=\"block-38f99df2-627c-4996-9956-e9b30a08bee2\" class=\"wp-block-code\"><code>&gt; kubectl config  get-contexts<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>CURRENT   NAME                                                 CLUSTER                                              AUTHINFO                                             NAMESPACE   \n          k3d-spinnaker                                        k3d-spinnaker                                        admin@k3d-spinnaker                                  spinnaker\n*         k3d-spinnaker-1                                      k3d-spinnaker-1                                      admin@k3d-spinnaker-1                                \n          rancher-desktop                                      rancher-desktop                                      rancher-desktop                        <\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&gt; k config use-context k3d-spinnaker\nSwitched to context \"k3d-spinnaker\".<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-pullquote has-white-color has-black-background-color has-text-color has-background\"><blockquote><p>It is recommended to avoid default namespace so I will be using Namespace : <code>spinnaker<\/code><\/p><\/blockquote><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-2-devspace-init\">Step 2: <code>devspace init<\/code><\/h2>\n\n\n\n<p>Init allows your configure as per your need and will generate devspace.yaml that will be eventually used for subsequent steps<\/p>\n\n\n\n<pre id=\"block-c6b0263f-1f5e-4705-848e-f673b49d7d10\" class=\"wp-block-code\"><code>devspace init -h<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>#######################################################\n#################### devspace init ####################\n#######################################################\nInitializes a new devspace project within the current\nfolder. Creates a devspace.yaml with all configuration.\n#######################################################\n\nUsage:\n  devspace init &#91;flags]\n  \nFlags:\n      --context string      Context path to use for intialization\n      --dockerfile string   Dockerfile to use for initialization (default \".\/Dockerfile\")\n  -h, --help                help for init\n      --provider string     The cloud provider to use\n  -r, --reconfigure         Change existing configuration\n  \nGlobal Flags:\n      --config string                The devspace config file to use\n      --debug                        Prints the stack trace if an error occurs\n      --disable-profile-activation   If true will ignore all profile activations\n      --inactivity-timeout int       Minutes the current user is inactive (no mouse or keyboard interaction) until DevSpace will exit automatically. 0 to disable. Only supported on windows and mac operating systems (default 180)\n      --kube-context string          The kubernetes context to use\n  -n, --namespace string             The kubernetes namespace to use\n      --no-warn                      If true does not show any warning when deploying into a different namespace or kube-context than before\n  -p, --profile strings              The DevSpace profiles to apply. Multiple profiles are applied in the order they are specified\n      --profile-parent strings       One or more profiles that should be applied before the specified profile (e.g. devspace dev --profile-parent=base1 --profile-parent=base2 --profile=my-profile)\n      --profile-refresh              If true will pull and re-download profile parent sources\n      --restore-vars                 If true will restore the variables from kubernetes before loading the config\n      --save-vars                    If true will save the variables to kubernetes after loading the config\n      --silent                       Run in silent mode and prevents any devspace log output except panics &amp; fatals\n  -s, --switch-context               DEPRECATED: Switches and uses the last kube context and namespace that was used to deploy the DevSpace project\n      --var strings                  Variables to override during execution (e.g. --var=MYVAR=MYVALUE)\n      --vars-secret string           The secret to restore\/save the variables from\/to, if --restore-vars or --save-vars is enabled (default \"devspace-vars\")<\/code><\/pre>\n\n\n\n<p>For my <code>spinnaker-hellow<\/code> app, I chose the following values<\/p>\n\n\n\n<pre id=\"block-b3d6a4c0-82d6-4afb-8c7f-798d353652bb\" class=\"wp-block-code\"><code>devspace init --debug    <\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>         \n     ____              ____                       \n    |  _ \\  _____   __\/ ___| _ __   __ _  ___ ___ \n    | | | |\/ _ \\ \\ \/ \/\\___ \\| '_ \\ \/ _` |\/ __\/ _ \\\n    | |_| |  __\/\\ V \/  ___) | |_) | (_| | (_|  __\/\n    |____\/ \\___| \\_\/  |____\/| .__\/ \\__,_|\\___\\___|\n                            |_|\n\n\n? How do you want to deploy this project? helm: Use my own Helm chart (e.g. local via .\/chart\/ or any remote chart)\n\n? Which Helm chart do you want to use? \n\n? Please enter the relative path to your local Helm chart (e.g. .\/chart) hellow\n\n? What is the main container image of this project which is deployed by this Helm chart? (e.g. ecr.io\/project\/image) bhanuni\/spinnaker-hellow\n\n? How should DevSpace build the container image for this project? Based on this existing Dockerfile: .\/Dockerfile\n\n19:10:41 &#91;info]   DevSpace does *not* require pushing your images to a registry but let's check your registry credentials for this image (optional)\n&#91;wait] \u2807 Checking registry authentication for hub.docker.com (25s)\n                                                                       \n19:11:08 &#91;warn]   Unable to find registry credentials for hub.docker.com\n19:11:08 &#91;warn]   Running `docker login` for you to authenticate with the registry (optional)\n\n? What is your username for hub.docker.com? (optional, Enter to skip) \n\n19:11:08 &#91;warn]   Skipping image registry authentication.\n19:11:08 &#91;warn]   You may ignore this warning. Pushing images to a registry is *not* required.\n\n? Which port is your application listening on? (Enter to skip) 8181\n\n19:11:44 &#91;info]   Configuration saved in devspace.yaml - you can make adjustments as needed\n19:11:44 &#91;done] \u221a Project successfully initialized\n         &#91;info]   \nYou can now run:\n- `devspace use namespace` to pick which Kubernetes namespace to work in\n- `devspace dev` to start developing your project in Kubernetes\n- `devspace deploy -p production` to deploy your project to Kubernetes\n- `devspace -h` to get a list of available commands<\/code><\/pre>\n\n\n\n<p>This will generate a <code>devspace.yaml<\/code> file which we will edit for custom values.<\/p>\n\n\n\n<figure class=\"wp-block-pullquote has-white-color has-black-background-color has-text-color has-background\"><blockquote><p>I have configured a secret docker-registry <code>samarthya-docker<\/code> for the credentials for the docker hub.<\/p><\/blockquote><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>&gt; k get secrets\n\nNAME                  TYPE                                  DATA   AGE\nsamarthya-docker      kubernetes.io\/dockerconfigjson        1      3h11m<\/code><\/pre>\n\n\n\n<p>Edit the <code>devspace.yaml<\/code> for the secrets<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pullSecrets:\n- registry: \"samarthya-docker\"\n  username: ${REGISTRY_USERNAME}\n  password: ${REGISTRY_PASSWORD}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"use-namespace-spinnaker\">Use Namespace: <code>Spinnaker<\/code><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&gt; devspace use namespace spinnaker\n&#91;done] \u221a Successfully set default namespace to 'spinnaker'<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"configure-the-values-yaml-to-override\">Configure the Values.yaml to override<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>deployments:\n    values:\n      image:\n        repository: ${IMAGE}\n        tag: \"189\"<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-3-devspace-deploy\">Step 3: <code>devspace deploy<\/code><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>devspace deploy <\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;info]   Using namespace 'spinnaker'\n&#91;info]   Using kube context 'k3d-spinnaker'\n&#91;info]   Skipping deployment spinnaker-hellow                                \n&#91;done] \u221a Successfully deployed!\n         \nRun: \n- `devspace open` to create an ingress for the app and open it in the browser \n- `devspace enter` to open a shell into the container \n- `devspace logs` to show the container logs\n- `devspace analyze` to analyze the space for potential issues<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-4-devspace-open\">Step 4: <code>devspace open<\/code><\/h2>\n\n\n\n<p>Issue the open command to view the application<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"162\" src=\"https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2022\/02\/Screenshot-2022-02-16-at-12.42.53-PM-1024x162.png\" alt=\"\" class=\"wp-image-2143\" srcset=\"https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2022\/02\/Screenshot-2022-02-16-at-12.42.53-PM-1024x162.png 1024w, https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2022\/02\/Screenshot-2022-02-16-at-12.42.53-PM-300x47.png 300w, https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2022\/02\/Screenshot-2022-02-16-at-12.42.53-PM-1536x243.png 1536w, https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2022\/02\/Screenshot-2022-02-16-at-12.42.53-PM.png 1820w, https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2022\/02\/Screenshot-2022-02-16-at-12.42.53-PM-300x47@2x.png 600w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Look at the namespace used and the context used<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;info]   Using namespace 'spinnaker'\n&#91;info]   Using kube context 'k3d-spinnaker'<\/code><\/pre>\n\n\n\n<p>Browse and check the two end points <code>'\/ping'<\/code> and the &#8216;<code>\/'<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><img decoding=\"async\" width=\"1024\" height=\"296\" src=\"https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2022\/02\/Screenshot-2022-02-16-at-12.42.43-PM-1024x296.png\" alt=\"\" class=\"wp-image-2144\" srcset=\"https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2022\/02\/Screenshot-2022-02-16-at-12.42.43-PM-1024x296.png 1024w, https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2022\/02\/Screenshot-2022-02-16-at-12.42.43-PM-300x87.png 300w, https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2022\/02\/Screenshot-2022-02-16-at-12.42.43-PM.png 1192w, https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2022\/02\/Screenshot-2022-02-16-at-12.42.43-PM-300x87@2x.png 600w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>URI &#8211; &#8216;\/ping&#8217;<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><img decoding=\"async\" width=\"1024\" height=\"276\" src=\"https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2022\/02\/Screenshot-2022-02-16-at-12.42.34-PM-1024x276.png\" alt=\"\" class=\"wp-image-2145\" srcset=\"https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2022\/02\/Screenshot-2022-02-16-at-12.42.34-PM-1024x276.png 1024w, https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2022\/02\/Screenshot-2022-02-16-at-12.42.34-PM-300x81.png 300w, https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2022\/02\/Screenshot-2022-02-16-at-12.42.34-PM.png 1126w, https:\/\/blog.samarthya.me\/wps\/wp-content\/uploads\/2022\/02\/Screenshot-2022-02-16-at-12.42.34-PM-300x81@2x.png 600w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>root &#8216;\/&#8217;<\/figcaption><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>devspace list deployments\n\n&#91;info]   Using namespace 'spinnaker'\n&#91;info]   Using kube context 'k3d-spinnaker'\n\n NAME               TYPE   DEPLOY   STATUS        \n spinnaker-hellow   Helm   hellow   Status:Deployed <\/code><\/pre>\n\n\n\n<p>Once the helm deployment has been success you can even check the service deployment via CURL<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&gt; devspace deploy\n&#91;info]   Using namespace 'spinnaker'\n&#91;info]   Using kube context 'k3d-spinnaker'\n&#91;info]   Execute 'helm upgrade spinnaker-hellow --namespace spinnaker --values \/var\/folders\/p5\/rfwqvcnj1zz9k3vxwq0vf9br0000gp\/T\/2512541306 --install hellow --kube-context k3d-spinnaker'\n&#91;done] \u221a Deployed helm chart (Release revision: 1)                     \n&#91;done] \u221a Successfully deployed spinnaker-hellow with helm              \n&#91;done] \u221a Successfully deployed!\n         \nRun: \n- `devspace open` to create an ingress for the app and open it in the browser \n- `devspace enter` to open a shell into the container \n- `devspace logs` to show the container logs\n- `devspace analyze` to analyze the space for potential issues<\/code><\/pre>\n\n\n\n<p>Get Service<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&gt; k get svc\nNAME                                         TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                                     AGE\nhaproxy-kubernetes-ingress-default-backend   ClusterIP   None            &lt;none&gt;        8080\/TCP                                    16h\nhaproxy-kubernetes-ingress                   NodePort    10.43.114.107   &lt;none&gt;        80:31622\/TCP,443:32274\/TCP,1024:31072\/TCP   16h\nspinnaker-hellow                             ClusterIP   10.43.153.162   &lt;none&gt;        8181\/TCP                                    5s<\/code><\/pre>\n\n\n\n<p>Run the curl command from the cluster<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/bin # curl http:\/\/10.43.153.162:8181\/ping\n{\"Status\":\"OK\"}\n\/bin # curl http:\/\/10.43.153.162:8181\/\nHello, Docker! &lt;3\/bin # <\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"check-logs-devspace-logs\">Check logs: <code>devspace logs<\/code><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&gt; devspace logs\n\n? Select a container spinnaker-hellow-657fc75c65-n4hrg:hellow\n&#91;info]   Printing logs of pod:container spinnaker-hellow-657fc75c65-n4hrg:hellow\n\n2022\/02\/16 07:06:42  initializing the application FN:init \n   ____    __\n  \/ __\/___\/ \/  ___\n \/ _\/\/ __\/ _ \\\/ _ \\\n\/___\/\\__\/_\/\/_\/\\___\/ v4.6.3\nHigh performance, minimalist Go web framework\nhttps:&#47;&#47;echo.labstack.com\n____________________________________O\/_______\n                                    O\\\n\u21e8 http server started on &#91;::]:8181\n{\"time\":\"2022-02-16T07:06:58.638811863Z\",\"id\":\"\",\"remote_ip\":\"10.42.0.55\",\"host\":\"10.43.153.162:8181\",\"method\":\"GET\",\"uri\":\"\/\",\"user_agent\":\"curl\/7.80.0\",\"status\":200,\"error\":\"\",\"latency\":18000,\"latency_human\":\"18\u00b5s\",\"bytes_in\":0,\"bytes_out\":17}\n{\"time\":\"2022-02-16T07:07:01.311488863Z\",\"id\":\"\",\"remote_ip\":\"10.42.0.55\",\"host\":\"10.43.153.162:8181\",\"method\":\"GET\",\"uri\":\"\/ping\",\"user_agent\":\"curl\/7.80.0\",\"status\":200,\"error\":\"\",\"latency\":180000,\"latency_human\":\"180\u00b5s\",\"bytes_in\":0,\"bytes_out\":16}\n{\"time\":\"2022-02-16T07:09:18.921986863Z\",\"id\":\"\",\"remote_ip\":\"10.42.0.55\",\"host\":\"10.43.153.162:8181\",\"method\":\"GET\",\"uri\":\"\/\",\"user_agent\":\"curl\/7.80.0\",\"status\":200,\"error\":\"\",\"latency\":212000,\"latency_human\":\"212\u00b5s\",\"bytes_in\":0,\"bytes_out\":17}<\/code><\/pre>\n\n\n\n<p>In the next blog I will try and configure it via ingress<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is devspace? devspace is a CLI tool for kubernetes, which can help you configure, deploy, debug. and test your application inside Kubernetes. DevSpace allows you to Store all your workflows in one declarative config file: devspace.yaml Standardize deployment and development workflows without requiring everyone on the team to become a Kubernetes expert. DevSpace allows [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2193,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"image","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[195,34,239],"tags":[45,242,243],"class_list":["post-2126","post","type-post","status-publish","format-image","has-post-thumbnail","hentry","category-kubernetes","category-technical","category-technical-2","tag-cluster","tag-k3d","tag-kubernetes","post_format-post-format-image"],"_links":{"self":[{"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/posts\/2126","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/comments?post=2126"}],"version-history":[{"count":0,"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/posts\/2126\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/media\/2193"}],"wp:attachment":[{"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/media?parent=2126"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/categories?post=2126"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.samarthya.me\/wps\/wp-json\/wp\/v2\/tags?post=2126"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}